Skip to content

improved prerequisite checks for __has_include handling#286

Merged
danmar merged 3 commits intocppcheck-opensource:masterfrom
firewave:cpp17
Apr 26, 2024
Merged

improved prerequisite checks for __has_include handling#286
danmar merged 3 commits intocppcheck-opensource:masterfrom
firewave:cpp17

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Jan 3, 2023

The check in simplecpp::preprocess obviously didn't work if gnu++ or another alias were used. Also the simplification should only be performed if supported.

This does not fix the hang tracked in https://trac.cppcheck.net/ticket/11456. The code there is unfortunately a file which is over 1.5 MB big so we need to find a smaller sample.

@firewave firewave changed the title improve prerequisites checks for __has_include handling improve prerequisite checks for __has_include handling Jan 3, 2023
@firewave firewave changed the title improve prerequisite checks for __has_include handling improved prerequisite checks for __has_include handling Jan 3, 2023
@firewave
Copy link
Copy Markdown
Collaborator Author

firewave commented Jan 3, 2023

Given that we have no default standard set and we don't check the standard in any other place the check in simplecpp::preprocess() should probably be removed (as well as the check I additionally added) so we always assume the highest possible standard in all cases.

Or we should assume the highest possible on if it is not specified. That would probably be better.

@firewave firewave marked this pull request as ready for review April 26, 2024 09:36
@firewave
Copy link
Copy Markdown
Collaborator Author

This should be fine to merge. I will address the case of default to the latest standard if none is provided in a different PR and also file a ticket about it.

@danmar danmar merged commit e040047 into cppcheck-opensource:master Apr 26, 2024
@firewave firewave deleted the cpp17 branch April 26, 2024 17:04
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.

2 participants