Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 23, 2024

Conversation

firewave
Copy link
Collaborator

No description provided.

@@ -68,7 +68,8 @@ class CPPCHECKLIB TokenList {
/** @return true if the code is C++ */
bool isCPP() const;

void setLang(Standards::Language lang);
// TODO: get rid of this
void setLang(Standards::Language lang, bool force = false);
Copy link
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 danmar:main May 23, 2024
63 checks passed
@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
…` when a language is enforced (danmar#6425)

(cherry picked from commit 9c21862)
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