Skip to content

fixed #12763 - do not assert in markup processing for unusedFunction when a language is enforced#6425

Merged
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:markup-lang
May 23, 2024
Merged

fixed #12763 - do not assert in markup processing for unusedFunction when a language is enforced#6425
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:markup-lang

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread lib/tokenlist.h

void setLang(Standards::Language lang);
// TODO: get rid of this
void setLang(Standards::Language lang, bool force = false);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is just a hack. The only other user is the Clang import because our unit tests use data in an incomplete format.

Also all this logic and asserts will (hopefully) go away when we perform the file identification early on for all input instead of on-demand when it is tokenized.

@firewave firewave changed the title do not assert in markup processing for unusedFunction when a language is enforced fixed #12763 - do not assert in markup processing for unusedFunction when a language is enforced May 23, 2024
@firewave firewave merged commit 9c21862 into cppcheck-opensource:main May 23, 2024
@firewave firewave deleted the markup-lang branch May 23, 2024 12:19
firewave added a commit to firewave/cppcheck that referenced this pull request May 23, 2024
danmar pushed a commit to cppchecksolutions/cppcheck that referenced this pull request May 26, 2024
danmar pushed a commit to cppchecksolutions/cppcheck that referenced this pull request May 26, 2024
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