René's URL Explorer Experiment


Title: Fix #15208 (cppcheck-suppress-macro has no effect on a macro whose body is a single macro call) by JayToltTech · Pull Request #9018 · cppcheck-opensource/cppcheck · GitHub

Open Graph Title: Fix #15208 (cppcheck-suppress-macro has no effect on a macro whose body is a single macro call) by JayToltTech · Pull Request #9018 · cppcheck-opensource/cppcheck

X Title: Fix #15208 (cppcheck-suppress-macro has no effect on a macro whose body is a single macro call) by JayToltTech · Pull Request #9018 · cppcheck-opensource/cppcheck

Description: https://trac.cppcheck.net/ticket/15208 A cppcheck-suppress-macro on a macro whose body is one call to another macro never matches. Zephyr's LOG_ERR(...) -> Z_LOG(...) has this shape, which is where I ran into it. Root cause: macro suppressions are matched per line against the macro names on that line's tokens, and a token only records the innermost macro it was expanded from. With #define ALIAS(...) CAST(__VA_ARGS__) every token on the ALIAS(d) line says CAST, so nothing carries ALIAS. Wrapping the body in do { } while (0) 'works' only because those tokens belong to the outer macro. The preprocessor already has the outer expansions in its macro usage list with their use locations, so setLocationMacros() now adds those names for the use line too. No change to simplecpp. Added a test in TestSuppressions that fails without the change. testrunner passes locally (macOS arm64). I haven't run the test/cli Python tests. runformat with uncrustify 0.80.1 makes no changes. Added myself to AUTHORS as this is my first PR here.

Open Graph Description: https://trac.cppcheck.net/ticket/15208 A cppcheck-suppress-macro on a macro whose body is one call to another macro never matches. Zephyr's LOG_ERR(...) -> Z_LOG(...) has this shape, which ...

X Description: https://trac.cppcheck.net/ticket/15208 A cppcheck-suppress-macro on a macro whose body is one call to another macro never matches. Zephyr's LOG_ERR(...) -> Z_LOG(...) has this shape...

Opengraph URL: https://github.com/cppcheck-opensource/cppcheck/pull/9018

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6457ec51-f12c-5495-7b9a-2e3a8723f2d5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA546:23EEB5:2B4ECF:3BD5A7:6AFC4DAD
html-safe-nonce127686adb9ca939659c903bf61ebc0021438d8e4c6af09959614f47cce4c4637
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTQ2OjIzRUVCNToyQjRFQ0Y6M0JENUE3OjZBRkM0REFEIiwidmlzaXRvcl9pZCI6IjQ2NDkyMzAzODk5MTUzNTUzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac34972fea8d30ddfa18f3b4ca4ab9ac7f0451620f45e96d8109fc36b306b9e4d4
hovercard-subject-tagpull_request:5265480602
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/cppcheck-opensource/cppcheck/pull/9018/files
twitter:imagehttps://avatars.githubusercontent.com/u/69092530?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/69092530?s=400&v=4
og:image:althttps://trac.cppcheck.net/ticket/15208 A cppcheck-suppress-macro on a macro whose body is one call to another macro never matches. Zephyr's LOG_ERR(...) -> Z_LOG(...) has this shape, which ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb63557e0027d8014589e873df28328da74a4356701bb1a9eab49dbf012ba8fa6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cppcheck-opensource/cppcheck git https://github.com/cppcheck-opensource/cppcheck.git
octolytics-dimension-user_id278097703
octolytics-dimension-user_logincppcheck-opensource
octolytics-dimension-repository_id143131
octolytics-dimension-repository_nwocppcheck-opensource/cppcheck
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143131
octolytics-dimension-repository_network_root_nwocppcheck-opensource/cppcheck
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0243355b0352c83733a042e0dfb3d75149b51261
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fcppcheck%2Fpull%2F9018%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fcppcheck%2Fpull%2F9018%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cppcheck-opensource%2Fcppcheck
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
cppcheck-opensourcehttps://github.com/cppcheck-opensource
cppcheckhttps://github.com/cppcheck-opensource/cppcheck
Codehttps://github.com/cppcheck-opensource/cppcheck
Pull requests222 (222)https://github.com/cppcheck-opensource/cppcheck/pulls
Actionshttps://github.com/cppcheck-opensource/cppcheck/actions
Security and qualityhttps://github.com/cppcheck-opensource/cppcheck/security
Insightshttps://github.com/cppcheck-opensource/cppcheck/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcppcheck-opensource%2Fcppcheck%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck%2Fissues%2Fnew%2Fchoose
JayToltTechhttps://github.com/JayToltTech
cppcheck-opensource:mainhttps://github.com/cppcheck-opensource/cppcheck/tree/main
JayToltTech:fix-15208-suppress-macro-nestedhttps://github.com/JayToltTech/cppcheck/tree/fix-15208-suppress-macro-nested
Conversation 10 https://github.com/cppcheck-opensource/cppcheck/pull/9018
Commits 4 https://github.com/cppcheck-opensource/cppcheck/pull/9018/commits
Checks 0 https://github.com/cppcheck-opensource/cppcheck/pull/9018/checks
Files changed https://github.com/cppcheck-opensource/cppcheck/pull/9018/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
Fix #15208 (cppcheck-suppress-macro has no effect on a macro whose body is a single macro call) https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#top
Show all changes 4 commits https://github.com/cppcheck-opensource/cppcheck/pull/9018/files
5a5c660 Fix #15208 (cppcheck-suppress-macro has no effect on a macro whose bo… JayToltTech Nov 11, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/9018/commits/5a5c660b7265febb1b8540ac0ccd61d359b6cd74
06cdcba Only count macro usages that produced tokens on the line JayToltTech Nov 13, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/9018/commits/06cdcba849380e0c40b39acc5609c7b140e9ec2e
82ffca5 Use std::transform to collect macro usage names JayToltTech Nov 13, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/9018/commits/82ffca5386973c15cb4f5a1c43b3dbb392f114b5
6c9ac81 Match an unexpanded macro name by column, not by line JayToltTech Nov 16, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/9018/commits/6c9ac817a867d5c69180cad9ec82083258a4f6b4
Clear filters https://github.com/cppcheck-opensource/cppcheck/pull/9018/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
AUTHORS https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-ab6af77435f58cc0c9d4c31dfe05656e45187cc7c7fc02aada401a7642125463
cppcheck.cpp https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
preprocessor.h https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-c25644b90eb1da73b15cb25880d44243f9393100da04c37776a834c12e878c4c
testsuppressions.cpp https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-76f9ed5891bfaac2457d897a96a70311b723fca6b2b747a2610bd3677715946b
AUTHORShttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-ab6af77435f58cc0c9d4c31dfe05656e45187cc7c7fc02aada401a7642125463
View file https://github.com/cppcheck-opensource/cppcheck/blob/6c9ac817a867d5c69180cad9ec82083258a4f6b4/AUTHORS
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/9018/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-ab6af77435f58cc0c9d4c31dfe05656e45187cc7c7fc02aada401a7642125463
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-ab6af77435f58cc0c9d4c31dfe05656e45187cc7c7fc02aada401a7642125463
lib/cppcheck.cpphttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
View file https://github.com/cppcheck-opensource/cppcheck/blob/6c9ac817a867d5c69180cad9ec82083258a4f6b4/lib/cppcheck.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/9018/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
dmcppcheckhttps://github.com/dmcppcheck
Nov 16, 2026https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#r4593230401
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
JayToltTechhttps://github.com/JayToltTech
Nov 16, 2026https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#r4593328861
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
cppcheck-opensource/simplecpp#764https://github.com/cppcheck-opensource/simplecpp/pull/764
6c9ac81https://github.com/cppcheck-opensource/cppcheck/commit/6c9ac817a867d5c69180cad9ec82083258a4f6b4
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
lib/preprocessor.hhttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-c25644b90eb1da73b15cb25880d44243f9393100da04c37776a834c12e878c4c
View file https://github.com/cppcheck-opensource/cppcheck/blob/6c9ac817a867d5c69180cad9ec82083258a4f6b4/lib/preprocessor.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/9018/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-c25644b90eb1da73b15cb25880d44243f9393100da04c37776a834c12e878c4c
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-c25644b90eb1da73b15cb25880d44243f9393100da04c37776a834c12e878c4c
test/testsuppressions.cpphttps://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-76f9ed5891bfaac2457d897a96a70311b723fca6b2b747a2610bd3677715946b
View file https://github.com/cppcheck-opensource/cppcheck/blob/6c9ac817a867d5c69180cad9ec82083258a4f6b4/test/testsuppressions.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/9018/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-76f9ed5891bfaac2457d897a96a70311b723fca6b2b747a2610bd3677715946b
https://github.com/cppcheck-opensource/cppcheck/pull/9018/files#diff-76f9ed5891bfaac2457d897a96a70311b723fca6b2b747a2610bd3677715946b
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.