diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-08 21:33:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-08 21:33:23 +0000 |
commit | f19ac0ede900dae8188eae0362027e60bfa82a32 (patch) | |
tree | fb13a15dbe02acb3e93a7de7a30bdfb70975fd1b /clang/lib/Sema/SemaDecl.cpp | |
parent | d9235dbc02f6b7054952b25a22c16670dfa8cb92 (diff) | |
download | bcm5719-llvm-f19ac0ede900dae8188eae0362027e60bfa82a32.tar.gz bcm5719-llvm-f19ac0ede900dae8188eae0362027e60bfa82a32.zip |
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.
llvm-svn: 100814
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 82cecc3f4d0..9d0d7ad1330 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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); |