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

-Wreserved-macro-identifier does not catch command line macros #56159

Closed
AaronBallman opened this issue Jun 22, 2022 · 5 comments
Closed

-Wreserved-macro-identifier does not catch command line macros #56159

AaronBallman opened this issue Jun 22, 2022 · 5 comments
Assignees
Labels
clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer good first issue https://github.com/llvm/llvm-project/contribute

Comments

@AaronBallman
Copy link
Collaborator

If you define or undefine a reserved macro name within the TU, we properly diagnose it. But if you define or undefine a macro using the command line, we do not issue any diagnostics. I think the command line should be treated the same as within a TU.

Live example: https://godbolt.org/z/3edqooWr9

@AaronBallman AaronBallman added good first issue https://github.com/llvm/llvm-project/contribute clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer labels Jun 22, 2022
@llvmbot
Copy link
Member

llvmbot commented Jun 22, 2022

@llvm/issue-subscribers-good-first-issue

@llvmbot
Copy link
Member

llvmbot commented Jun 22, 2022

@llvm/issue-subscribers-clang-frontend

@jackhong12
Copy link
Member

Hi, @AaronBallman. I hope to fix this issue.

@jackhong12
Copy link
Member

Revision: https://reviews.llvm.org/D129061

@xgupta xgupta added the awaiting-review Has pending Phabricator review label May 6, 2023
@Endilll
Copy link
Contributor

Endilll commented Jan 20, 2024

Appears to be fixed in Clang 17: https://godbolt.org/z/fKv36rbMP

@Endilll Endilll closed this as completed Jan 20, 2024
@Endilll Endilll removed clang:frontend Language frontend issues, e.g. anything involving "Sema" awaiting-review Has pending Phabricator review labels Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer good first issue https://github.com/llvm/llvm-project/contribute
Projects
None yet
Development

No branches or pull requests

5 participants