aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-08 21:33:23 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-08 21:33:23 +0000
commitcb821d045f5e445384f34d05a526955036073c4a (patch)
treedf65855fc07b4d78aa1419c30edc2b9771644001 /lib/Sema/SemaDecl.cpp
parent7732cc9c0fdc97a2f8cce4e5933d8103213d1aef (diff)
Downgrade the "declaration does not declare anything" error to a
warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 82cecc3f4d..9d0d7ad133 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1459,7 +1459,7 @@ Sema::DeclPtrTy Sema::ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS) {
Record->getDeclContext()->isRecord())
return BuildAnonymousStructOrUnion(S, DS, Record);
- Diag(DS.getSourceRange().getBegin(), diag::err_no_declarators)
+ Diag(DS.getSourceRange().getBegin(), diag::ext_no_declarators)
<< DS.getSourceRange();
}
@@ -1481,9 +1481,8 @@ Sema::DeclPtrTy Sema::ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS) {
return DeclPtrTy::make(Tag);
}
- Diag(DS.getSourceRange().getBegin(), diag::err_no_declarators)
+ Diag(DS.getSourceRange().getBegin(), diag::ext_no_declarators)
<< DS.getSourceRange();
- return DeclPtrTy();
}
return DeclPtrTy::make(Tag);