-Wreserved-macro-identifier does not catch command line macros
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
@llvm/issue-subscribers-good-first-issue
@llvm/issue-subscribers-clang-frontend
Hi, @AaronBallman. I hope to fix this issue.
Revision: https://reviews.llvm.org/D129061
Appears to be fixed in Clang 17: https://godbolt.org/z/fKv36rbMP