[llvm-branch-commits] [clang] [clang] Adjust -pedantic-errors -WX/-Wno-error=X interaction (#184756) (PR #188422)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Apr 10 21:44:05 PDT 2026
MaskRay wrote:
The second fix (-Wfoo no longer blocking -pedantic-errors): this turn warnings into errors. However, it only applies when `-pedantic-errors` is active and the user explicitly passed `-Wfoo` for an extension diagnostic. I think this combination is rare. They should use `-Wno-error=foo` (fixed by this PR) or `-Wno-foo`, which matches GCC behavior.
Without back porting this patch, compiling `__COUNTER__` with `-pedantic-errors` will lead to an error that clang 21 accepts: https://github.com/llvm/llvm-project/issues/184250#issue-4013637478
https://github.com/llvm/llvm-project/pull/188422
More information about the llvm-branch-commits
mailing list