using cppcheck for a long time now I got interested in the internals and maybe can help on some little improvements from time to time.
When working on #7740, I wondered about the token flag eKeyword: this flag is not yet set for keywords such as return, throw, ...
Is there a reason for this?
I wanted to set this flag in case of a keyword, but that led to broken test cases.
I think setting the flag would help when matching code patterns. For example, "return" is recognized as a type by cppcheck, and I have to manually check if that "return" is a keyword and add extra code for handling this.
Any comments?
Regards
Harry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The reason is simply that its implementation has never been finished. Actually, there is currently only one keyword for which it is set: "delete". It would be very nice to have a patch that sets eKeyword for each language keyword.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
using cppcheck for a long time now I got interested in the internals and maybe can help on some little improvements from time to time.
When working on #7740, I wondered about the token flag eKeyword: this flag is not yet set for keywords such as return, throw, ...
Is there a reason for this?
I wanted to set this flag in case of a keyword, but that led to broken test cases.
I think setting the flag would help when matching code patterns. For example, "return" is recognized as a type by cppcheck, and I have to manually check if that "return" is a keyword and add extra code for handling this.
Any comments?
Regards
Harry
The reason is simply that its implementation has never been finished. Actually, there is currently only one keyword for which it is set: "delete". It would be very nice to have a patch that sets eKeyword for each language keyword.
ok. thanks for the answer.