Files
clang-p2996/clang/test/Lexer/Inputs/final-macro.h
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

5 lines
166 B
C

// expected-warning@+2{{macro 'Foo' has been marked as deprecated}}
// expected-warning@+1{{macro 'Foo' has been marked as unsafe for use in headers}}
#if Foo
#endif