forked from OSchip/llvm-project
Add a fixit to remove storage specifiers on anonymous enums.
llvm-svn: 142565
This commit is contained in:
parent
357cd4e715
commit
6f686fc271
|
@ -1,4 +1,4 @@
|
|||
//===--- ExpressionTraits.h - C++ Expression Traits Support Enumerations --===//
|
||||
//===- ExpressionTraits.h - C++ Expression Traits Support Enums -*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue