added clean C/C++ keyword lists and use them in TokenList#3774
Merged
danmar merged 2 commits intocppcheck-opensource:mainfrom Feb 24, 2023
Merged
added clean C/C++ keyword lists and use them in TokenList#3774danmar merged 2 commits intocppcheck-opensource:mainfrom
TokenList#3774danmar merged 2 commits intocppcheck-opensource:mainfrom
Conversation
15291c2 to
0fb6792
Compare
Collaborator
Author
|
The interface might not be the best. I will try to replace 1 or 2 of the existing usages locally first to see if it actually makes sense. |
TokenList
Collaborator
Author
|
Using the static lists instead of building them on-demand in before: after: |
danmar
reviewed
Feb 24, 2023
firewave
added a commit
that referenced
this pull request
Jan 13, 2024
…ath::isCPP()`, `Path::isC()` and `Path::isHeader()` (#4681) None of the `Path::is*()` function is working as expected or consistent (detailed via additional unit tests and deprecation comments). I tried to fix them but that would have made made cases with headers quite awkward to implement so I opted to generate a new function. This also optimized `Path::acceptFile()` a file. I am not 100% happy with including `settings.h` but I didn't see a place to move this to. If #3774 gets merged we might be able to move the `enum` into `keywords.h` (that could also be renamed). I kept the old function in case somebody else is using these (they are in the API after all) and will remove them after the next release.
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.
There are various hard-coded lists of these across the code. Some of them are even incomplete, contain non-keywords or attribute keywords to a standard they do not belong to.
This is in preparation so those instances can be incrementally be replaced with these proper global lists.