summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-10-20 02:10:55 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-10-20 02:10:55 +0000
commit6f686fc271bbee29bdbbadaf173f57c73700df0a (patch)
tree39bd6ee940f21f8b00831646b321f144d9fc5c1e /clang/lib
parent357cd4e715cd46e927404b4d19a94c9aaf459a4d (diff)
downloadbcm5719-llvm-6f686fc271bbee29bdbbadaf173f57c73700df0a.tar.gz
bcm5719-llvm-6f686fc271bbee29bdbbadaf173f57c73700df0a.zip
Add a fixit to remove storage specifiers on anonymous enums.
llvm-svn: 142565
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 25aee27a970..8d9785019cd 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2666,7 +2666,8 @@ Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
else if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified &&
isa<RecordDecl>(Owner)) {
Diag(DS.getStorageClassSpecLoc(),
- diag::err_anonymous_union_with_storage_spec);
+ diag::err_anonymous_union_with_storage_spec)
+ << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());
Invalid = true;
// Recover by removing the storage specifier.
OpenPOWER on IntegriCloud