Commit Graph

2 Commits

Author SHA1 Message Date
Chris Bieneman 3e7ad1f2b2 Emit final macro diagnostics in system headers
Final macro diagnostics should log from system headers.

As planned, final macros are hard-mode. They always log diagnostics.
2021-11-11 13:51:26 -06:00
Chris Bieneman 1e48ef2035 Implement #pragma clang final extension
This patch adds a new preprocessor extension ``#pragma clang final``
which enables warning on undefinition and re-definition of macros.

The intent of this warning is to extend beyond ``-Wmacro-redefined`` to
warn against any and all alterations to macros that are marked `final`.

This warning is part of the ``-Wpedantic-macros`` diagnostics group.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D108567
2021-09-27 14:11:16 -05:00