diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-10-20 02:10:55 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-10-20 02:10:55 +0000 |
commit | f6f876cb08449febc43a6baf7720b256846d01dc (patch) | |
tree | cfdb82522315bbec290ba892c1cd2440aa83c847 /lib/Sema/SemaDecl.cpp | |
parent | 70042f5d1ca378138f90b7b9384023701f5d03d8 (diff) |
Add a fixit to remove storage specifiers on anonymous enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 25aee27a97..8d9785019c 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/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. |