Index: include/clang/Basic/DiagnosticGroups.td =================================================================== --- include/clang/Basic/DiagnosticGroups.td +++ include/clang/Basic/DiagnosticGroups.td @@ -439,8 +439,9 @@ def UninitializedStaticSelfInit : DiagGroup<"static-self-init">; def Uninitialized : DiagGroup<"uninitialized", [UninitializedSometimes, UninitializedStaticSelfInit]>; +def IgnoredPragmaIntrinsic : DiagGroup<"ignored-pragma-intrinsic">; def UnknownPragmas : DiagGroup<"unknown-pragmas">; -def IgnoredPragmas : DiagGroup<"ignored-pragmas">; +def IgnoredPragmas : DiagGroup<"ignored-pragmas", [IgnoredPragmaIntrinsic]>; def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas]>; def UnknownWarningOption : DiagGroup<"unknown-warning-option">; def NSobjectAttribute : DiagGroup<"NSObject-attribute">; Index: include/clang/Basic/DiagnosticParseKinds.td =================================================================== --- include/clang/Basic/DiagnosticParseKinds.td +++ include/clang/Basic/DiagnosticParseKinds.td @@ -914,7 +914,7 @@ // - #pragma intrinsic def warn_pragma_intrinsic_builtin : Warning< "%0 is not a recognized builtin%select{|; consider including to access non-builtin intrinsics}1">, - InGroup; + InGroup; // - #pragma unused def warn_pragma_unused_expected_var : Warning< "expected '#pragma unused' argument to be a variable name">, Index: test/Preprocessor/pragma_microsoft.c =================================================================== --- test/Preprocessor/pragma_microsoft.c +++ test/Preprocessor/pragma_microsoft.c @@ -178,3 +178,15 @@ #pragma intrinsic(memset) // no-warning #undef __INTRIN_H #pragma intrinsic(asdf) // expected-warning {{'asdf' is not a recognized builtin; consider including }} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wignored-pragma-intrinsic" +#pragma intrinsic(asdf) // no-warning +#pragma clang diagnostic pop +#pragma intrinsic(asdf) // expected-warning {{'asdf' is not a recognized builtin; consider including }} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wignored-pragmas" +#pragma intrinsic(asdf) // no-warning +#pragma clang diagnostic pop +#pragma intrinsic(asdf) // expected-warning {{'asdf' is not a recognized builtin; consider including }}