Reversing the logic since C99 mode is actually not an extension. Also, changing the group to the singular to match the diagnostic better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162838 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index e8ce9ac..8fdb070 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -681,9 +681,9 @@
// not what the user intended, we will always warn. We do not need to set the
// qualifier's location since we already have it.
if (TypeQualifiers & T) {
- bool IsExtension = false;
+ bool IsExtension = true;
if (Lang.C99 || (Lang.CPlusPlus0x && !IsTypeSpec))
- IsExtension = true;
+ IsExtension = false;
return BadSpecifier(T, T, PrevSpec, DiagID, IsExtension);
}
TypeQualifiers |= T;