[cfe-commits] r162838 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticParseKinds.td lib/Sema/DeclSpec.cpp
Aaron Ballman
aaron at aaronballman.com
Wed Aug 29 05:35:14 PDT 2012
Author: aaronballman
Date: Wed Aug 29 07:35:14 2012
New Revision: 162838
URL: http://llvm.org/viewvc/llvm-project?rev=162838&view=rev
Log:
Reversing the logic since C99 mode is actually not an extension. Also, changing the group to the singular to match the diagnostic better.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
cfe/trunk/lib/Sema/DeclSpec.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=162838&r1=162837&r2=162838&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Wed Aug 29 07:35:14 2012
@@ -197,7 +197,7 @@
def StrncatSize : DiagGroup<"strncat-size">;
def TautologicalCompare : DiagGroup<"tautological-compare">;
def HeaderHygiene : DiagGroup<"header-hygiene">;
-def DuplicateDeclSpecifiers : DiagGroup<"duplicate-decl-specifiers">;
+def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">;
// Preprocessor warnings.
def : DiagGroup<"builtin-macro-redefined">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=162838&r1=162837&r2=162838&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Wed Aug 29 07:35:14 2012
@@ -44,9 +44,9 @@
InGroup<ExtraSemi>, DefaultIgnore;
def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">,
- InGroup<DuplicateDeclSpecifiers>;
+ InGroup<DuplicateDeclSpecifier>;
def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">,
- InGroup<DuplicateDeclSpecifiers>;
+ InGroup<DuplicateDeclSpecifier>;
def ext_plain_complex : ExtWarn<
"plain '_Complex' requires a type specifier; assuming '_Complex double'">;
def ext_integer_complex : Extension<
Modified: cfe/trunk/lib/Sema/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=162838&r1=162837&r2=162838&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/DeclSpec.cpp (original)
+++ cfe/trunk/lib/Sema/DeclSpec.cpp Wed Aug 29 07:35:14 2012
@@ -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;
More information about the cfe-commits
mailing list