Conversation
Owner
|
@eyalz800 Thanks! I noticed that this affects all the files, so I just went through and re-saved them all myself in VS Code with the trim-trailing-whitespace option set. I'll check in that commit instead of this PR. Thanks for pointing this out! Yes, I intend to start writing parts of cppfront itself in Cpp2 syntax in the medium term. |
Azmah-Bad
pushed a commit
to Azmah-Bad/cppfront
that referenced
this pull request
Feb 24, 2023
hsutter
added a commit
that referenced
this pull request
Apr 1, 2023
Note this change adds `{` `}` around member assignment statements in assignment operators.
That change now triggers Clang's `-Wbraced-scalar-init` warning, but this warning appears to be spurious. See the open Clang issue here llvm/llvm-project#54702 which mentions the same justification I had in mind (disallow implicit narrowing, that's the #1 reason to recommend using `{` `}` init where possible). Unfortunately that Clang issue still open without comments after a year and so it's hard to know the status.
(BTW, what a coincidence -- I actually hit this on the exact first anniversary of that issue, which also happens to be April 1 but I swear this is not a joke and I think the LLVM issue wasn't either...)
zaucy
pushed a commit
to zaucy/cppfront
that referenced
this pull request
Dec 5, 2023
Note this change adds `{` `}` around member assignment statements in assignment operators.
That change now triggers Clang's `-Wbraced-scalar-init` warning, but this warning appears to be spurious. See the open Clang issue here llvm/llvm-project#54702 which mentions the same justification I had in mind (disallow implicit narrowing, that's the hsutter#1 reason to recommend using `{` `}` init where possible). Unfortunately that Clang issue still open without comments after a year and so it's hard to know the status.
(BTW, what a coincidence -- I actually hit this on the exact first anniversary of that issue, which also happens to be April 1 but I swear this is not a joke and I think the LLVM issue wasn't either...)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Great work, hope you don't mind to remove trailing whitespaces as it can be distracting in some IDEs.
By the way - it could be nice to sometime convert the cppfront code itself to cpp2, and see how it goes.