From 7f4fbecbe20761a17b07e022fb97bd9f40e6b901 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 20 Oct 2011 20:40:00 +0000 Subject: When fixing up the storage class for an anonymous union, don't mark the anonymous union as valid: our fixes have Fix-Its. llvm-svn: 142616 --- clang/lib/Sema/SemaDecl.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index eff21cb12bb..f4c5237ff2b 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -2655,7 +2655,6 @@ Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, cast(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 @@ Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, 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, -- cgit v1.2.3