From 6f686fc271bbee29bdbbadaf173f57c73700df0a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 20 Oct 2011 02:10:55 +0000 Subject: Add a fixit to remove storage specifiers on anonymous enums. llvm-svn: 142565 --- clang/lib/Sema/SemaDecl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib') 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(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. -- cgit v1.2.3