Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or -Werror=foo all override the -pedantic options, and __extension__ robustly silences all extension diagnostics in their scope. An added bonus of this change is that MAP_DEFAULT goes away, meaning that per-diagnostic mapping information can now be stored in 2 bits, doubling the density of the Diagnostic::DiagMapping array. This also substantially simplifies Diagnostic::getDiagnosticLevel. OTOH, this temporarily introduces some "macro intensive" code in Diagnostic.cpp. This will be addressed in a later patch. llvm-svn: 69154
Showing
- clang/include/clang/Basic/Diagnostic.h 30 additions, 27 deletionsclang/include/clang/Basic/Diagnostic.h
- clang/lib/Basic/Diagnostic.cpp 107 additions, 58 deletionsclang/lib/Basic/Diagnostic.cpp
- clang/lib/Parse/ExtensionRAIIObject.h 2 additions, 4 deletionsclang/lib/Parse/ExtensionRAIIObject.h
- clang/test/Misc/diag-mapping.c 27 additions, 0 deletionsclang/test/Misc/diag-mapping.c
- clang/tools/clang-cc/Warnings.cpp 53 additions, 5 deletionsclang/tools/clang-cc/Warnings.cpp
Loading
Please register or sign in to comment