summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-20 20:40:00 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-20 20:40:00 +0000
commit7f4fbecbe20761a17b07e022fb97bd9f40e6b901 (patch)
tree1cd0f4d92193724e3d01d9fae4b9b1f336145f20 /clang/lib/Sema/SemaDecl.cpp
parentcf7bdf4438b2b1f6fedece6e955def61cc80fb8d (diff)
downloadbcm5719-llvm-7f4fbecbe20761a17b07e022fb97bd9f40e6b901.tar.gz
bcm5719-llvm-7f4fbecbe20761a17b07e022fb97bd9f40e6b901.zip
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
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 0 insertions, 2 deletions
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<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 @@ 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,
OpenPOWER on IntegriCloud