Implement #pragma clang restrict_expansion
This patch adds `#pragma clang restrict_expansion ` to enable flagging macros as unsafe for header use. This is to allow macros that may have ABI implications to be avoided in headers that have ABI stability promises. Using macros in headers (particularly public headers) can cause a variety of issues relating to ABI and modules. This new pragma logs warnings when using annotated macros outside the main source file. This warning is added under a new diagnostics group -Wpedantic-macros Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D107095
Loading
Please register or sign in to comment