Skip to content

Conversation

@firewave
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator Author

We do not detect this ourselves because of the conditional code inside.

I wonder if we could add a flag which does not omit such warnings similar to --emit-duplicates but I guess in this case it is not some global logic you could put a switch on.

@firewave
Copy link
Collaborator Author

We do not detect this ourselves because of the conditional code inside.

This is just an assumption. I do not have actually checked this (yet).

@firewave
Copy link
Collaborator Author

This is just an assumption. I do not have actually checked this (yet).

I confirmed that it is indeed omitted because of the preprocessor checks. But I do not see where the bailout happens in the code (I also wonder if we should write a debug message about the bailout).

@firewave
Copy link
Collaborator Author

But I do not see where the bailout happens in the code

It is the mTokenizer->hasIfdef() call in CheckClass::checkConstFunc().

@firewave
Copy link
Collaborator Author

It is the mTokenizer->hasIfdef() call in CheckClass::checkConstFunc().

I filed some tickets about possible improvements in the handling:
https://trac.cppcheck.net/ticket/13740
https://trac.cppcheck.net/ticket/13741

@firewave firewave marked this pull request as draft April 2, 2025 18:57
@firewave
Copy link
Collaborator Author

Superseded by #7415.

@firewave firewave closed this Jun 29, 2025
@firewave firewave deleted the cppchex-const branch June 29, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant