summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-16 15:40:40 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-16 15:40:40 +0000
commit3a8e0d7d5758c38cea0657cb2092adf52f24b41d (patch)
treea126bcf481ac5c28dda627ca6b91b6e35e73ed91 /clang/lib
parent5692680e0ec056984d2b91c49d87eec7481b63bf (diff)
downloadbcm5719-llvm-3a8e0d7d5758c38cea0657cb2092adf52f24b41d.tar.gz
bcm5719-llvm-3a8e0d7d5758c38cea0657cb2092adf52f24b41d.zip
Revert Microsoft-specific override of the "typedef requires a name"
diagnostic. Instead, put it and the "declaration does not declare anything" warning into -Wmissing-declarations. llvm-svn: 108527
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 12c60d2e901..f2f9a342151 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -1550,12 +1550,11 @@ Sema::DeclPtrTy Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
if (!DS.isMissingDeclaratorOk() &&
DS.getTypeSpecType() != DeclSpec::TST_error) {
// Warn about typedefs of enums without names, since this is an
- // extension in both Microsoft an GNU.
+ // extension in both Microsoft and GNU.
if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef &&
Tag && isa<EnumDecl>(Tag)) {
- if (!getLangOptions().Microsoft)
- Diag(DS.getSourceRange().getBegin(), diag::ext_typedef_without_a_name)
- << DS.getSourceRange();
+ Diag(DS.getSourceRange().getBegin(), diag::ext_typedef_without_a_name)
+ << DS.getSourceRange();
return DeclPtrTy::make(Tag);
}
OpenPOWER on IntegriCloud