-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Use in-class initializers, default constructors, class -> struct #4842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chrchr-github
merged 56 commits into
cppcheck-opensource:main
from
chrchr-github:chr_constructors
Aug 8, 2023
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
dacd2fa
Use in-class initializers, default constructors, class -> struct
chrchr-github 8be07e0
Format
chrchr-github cd89650
Missing init, more constructors
chrchr-github cdb56ba
Fix compiler error
chrchr-github 85f2632
Missing init
chrchr-github f3d693e
Missing init
chrchr-github 8a9424b
Restore init
chrchr-github 18b2ff5
Duplicate
chrchr-github 245889a
More constructors, rule of zero
chrchr-github d506867
More constructors
chrchr-github 206de7d
Fix init
chrchr-github b5278c9
Undo
chrchr-github 500ca9a
More constructors
chrchr-github 1784841
Format
chrchr-github 549a016
Workaround for internalAstError
chrchr-github d6e38fe
Fix compiler error
chrchr-github b5ed91e
clang-tidy
chrchr-github 081402e
More workarounds
chrchr-github f0a292b
Another enum fix
chrchr-github b8f2095
Amend
chrchr-github 06704f2
Amend again
chrchr-github 8895983
Enum fix
chrchr-github 22a6bf6
Enum fix
chrchr-github b735c8f
Enable clang-tidy checks
chrchr-github 32c637c
Fix warnings
chrchr-github 1126001
Merge
chrchr-github dd8aa5a
Amend
chrchr-github 4a0090c
Fix warnings
chrchr-github 6e6e803
Fix GUI warnings
chrchr-github 5ec31f0
Typo, redundant initializer
chrchr-github 95f171c
Redundant definition
chrchr-github c75f4d2
Init fixes
chrchr-github c34a40f
Merge
chrchr-github 1fdcf34
Amend
chrchr-github b69be93
Fix merge
chrchr-github 08482af
Undo
chrchr-github ca414cd
Merge branch 'main' into chr_constructors
chrchr-github 41f5085
Fix merge
chrchr-github ce5aedc
Merge branch 'chr_constructors' of https://github.com/chrchr-github/c…
chrchr-github 8890000
Merge, format .clang.tidy
chrchr-github b66c9a1
Merge
chrchr-github 59fec1f
Use = 0
chrchr-github 6e8e0ee
Format
chrchr-github fea2f46
Fix .clang-tidy
chrchr-github d0d1be4
Merge
chrchr-github 043226b
Merge
chrchr-github 4fc5cba
Merge branch 'danmar:main' into chr_constructors
chrchr-github 48bba24
Merge
chrchr-github 5d913dd
Merge
chrchr-github 97193c4
Fix merge
chrchr-github 1993756
Fix merge
chrchr-github 45e1d15
Merge
chrchr-github 60666f1
Merge
chrchr-github 3f73305
Merge
chrchr-github 44fe7f2
Merge
chrchr-github a6f613d
Merge
chrchr-github File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format is not supported in older clang-tidy versions which we implicitly still support as we also support older Clang versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who uses our
.clang-tidyexcept us? There is a way to get line-wise formatting in older versions as well, but it's ugly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every user who has an editor which support clang-tidy.
I know. If possible I would have used that already. The problem is that YAML parser in LLVM is not complete and only supports the bare minimum of features required. So, no.
The multi-line format was not added until about 3 years ago IIRC. We need to do some tests to figure out which version that was. As ubuntu 20.04 is definitely one of the operating systems we should properly support as a dev system it is quite possible we slightly missed that.
Another problem is, that it fails silently. So it will just ignore the option and will use the default checks.
They also just recently changed the default format to more modern YAML which is also not backwards compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I meant above, it should work with older clangs.
But even if there were developers (not users) on older systems, using an old clang makes little sense, since we have the current version in our CI, which needs to pass eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give it a spin later today. I have several older versions installed.
I think using any LTS version is justified. ubuntu 20.04 (still supported until at least 2025) comes with Clang 10 out of the box and it seems there's also an official repo with Clang 13. But distros rarely update such major packages after release. There's also the possibility to install the latest via the LLVM repo. But it also depends on your IDE integration. But the length of the LTS support windows have been getting quite ridiculous. I happy that non-LTS versions usually get discarded as soon as the next non-LTS ones are out. But unfortunately that solidifies the usage of older LTS versions.
Just take a look at the LLVM bug tracker. They frequently get reports for older versions.
Or ubuntu Touch - they have been working for years now to move off ubuntu 16.04 and just recently achieved their move to ubuntu 20.04. It is unlikely that their CI is using the latest compilers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need to open up the discussions here so we don't go off-topic so often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to not use the forum on sourceforge? We don't need several forums.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all development happens on Github, we might also close Sourceforge and focus on a single site. Probably more people are already on Github than on Sourceforge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds a lot. But cppcheck users will not see this file. This is not installed.
I would say it's only cppcheck developers that might use this. And well most developers will likely not use this file neither locally. I assume it makes sense to use it locally only if you have the same clang-tidy version as CI because there are different checkers in different versions.