aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 7346526265..82c8ea099d 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/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;
}