[cfe-commits] r142616 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Douglas Gregor dgregor at apple.com
Thu Oct 20 13:40:01 PDT 2011


Author: dgregor
Date: Thu Oct 20 15:40:00 2011
New Revision: 142616

URL: http://llvm.org/viewvc/llvm-project?rev=142616&view=rev
Log:
When fixing up the storage class for an anonymous union, don't mark
the anonymous union as valid: our fixes have Fix-Its.

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=142616&r1=142615&r2=142616&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Oct 20 15:40:00 2011
@@ -2655,7 +2655,6 @@
             cast<NamespaceDecl>(Owner)->getDeclName()))) {
         Diag(Record->getLocation(), diag::err_anonymous_union_not_static)
           << FixItHint::CreateInsertion(Record->getLocation(), "static ");
-        Invalid = true;
   
         // Recover by adding 'static'.
         DS.SetStorageClassSpec(*this, DeclSpec::SCS_static, SourceLocation(),
@@ -2669,7 +2668,6 @@
         Diag(DS.getStorageClassSpecLoc(),
              diag::err_anonymous_union_with_storage_spec)
           << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());
-        Invalid = true;
   
         // Recover by removing the storage specifier.
         DS.SetStorageClassSpec(*this, DeclSpec::SCS_unspecified, 





More information about the cfe-commits mailing list