diff options
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 73465262659..82c8ea099d1 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -741,9 +741,9 @@ Sema::DeclTy *Sema::ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS) { // Permit typedefs without declarators as a Microsoft extension. if (!DS.isMissingDeclaratorOk()) { - if (getLangOptions().Microsoft && - DS.getStorageClassSpec() == DeclSpec::SCS_typedef) { - Diag(DS.getSourceRange().getBegin(), diag::ext_no_declarators) + if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef && + Tag && isa<EnumDecl>(Tag)) { + Diag(DS.getSourceRange().getBegin(), diag::warn_no_declarators) << DS.getSourceRange(); return Tag; } |

