void Preprocessor::RegisterBuiltinPragmas() {
AddPragmaHandler(0, new PragmaOnceHandler(getIdentifierInfo("once")));
AddPragmaHandler(0, new PragmaMarkHandler(getIdentifierInfo("mark")));
+
+ // #pragma GCC ...
AddPragmaHandler("GCC", new PragmaPoisonHandler(getIdentifierInfo("poison")));
AddPragmaHandler("GCC", new PragmaSystemHeaderHandler(
getIdentifierInfo("system_header")));
getIdentifierInfo("dependency")));
AddPragmaHandler("GCC", new PragmaDiagnosticHandler(
getIdentifierInfo("diagnostic")));
-
+ // #pragma clang ...
+ AddPragmaHandler("clang", new PragmaPoisonHandler(
+ getIdentifierInfo("poison")));
+ AddPragmaHandler("clang", new PragmaSystemHeaderHandler(
+ getIdentifierInfo("system_header")));
+ AddPragmaHandler("clang", new PragmaDependencyHandler(
+ getIdentifierInfo("dependency")));
+ AddPragmaHandler("clang", new PragmaDiagnosticHandler(
+ getIdentifierInfo("diagnostic")));
+
AddPragmaHandler("STDC", new PragmaSTDC_FP_CONTRACTHandler(
getIdentifierInfo("FP_CONTRACT")));
AddPragmaHandler("STDC", new PragmaSTDC_FENV_ACCESSHandler(
};
-#pragma GCC diagnostic ignored "-Wmultichar"
+#pragma clang diagnostic ignored "-Wmultichar"
char d = 'df'; // no warning.
char e = 'abcd'; // still warn: expected-warning {{multi-character character constant}}
-#pragma GCC diagnostic ignored "-Wfour-char-constants"
+#pragma clang diagnostic ignored "-Wfour-char-constants"
char f = 'abcd'; // ignored.