aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-16 15:18:19 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-16 15:18:19 +0000
commit0c99ec6d229b49085ec3c364d5c6090b33438a93 (patch)
tree7e71674bef14a9e358cd6b864bba89c21ebd6cdd /lib/Sema/SemaDecl.cpp
parentc9068d7dd94d439cec66c421115d15303e481025 (diff)
Suppress the "typedef requires a name" warning in Microsoft-extensions mode
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 29ecdbc680..12c60d2e90 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1553,8 +1553,9 @@ Sema::DeclPtrTy Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
// extension in both Microsoft an GNU.
if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef &&
Tag && isa<EnumDecl>(Tag)) {
- Diag(DS.getSourceRange().getBegin(), diag::ext_typedef_without_a_name)
- << DS.getSourceRange();
+ if (!getLangOptions().Microsoft)
+ Diag(DS.getSourceRange().getBegin(), diag::ext_typedef_without_a_name)
+ << DS.getSourceRange();
return DeclPtrTy::make(Tag);
}