Skip to content

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

@AaronBallman

Description

@AaronBallman

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

Metadata

Metadata

Assignees

Labels

clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzergood first issuehttps://github.com/llvm/llvm-project/contribute

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions