diff options
author | Alp Toker <alp@nuanti.com> | 2014-05-28 12:20:14 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-05-28 12:20:14 +0000 |
commit | 2afa8780d62a9334fdbdb0c46f814d211e2083b3 (patch) | |
tree | d1ee6166d6845e905784c21d0dd9f6d0eb2f88c4 /clang/lib/Sema/SemaExpr.cpp | |
parent | a9c452121a395908ed3f8e4034fc55254933bbd1 (diff) | |
download | bcm5719-llvm-2afa8780d62a9334fdbdb0c46f814d211e2083b3.tar.gz bcm5719-llvm-2afa8780d62a9334fdbdb0c46f814d211e2083b3.zip |
Consolidate some note diagnostics
These note diags have the same message and can be unified further but for now
let's just bring them together.
Incidental change: Display a source range in the final attr diagnostic.
llvm-svn: 209728
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index a9f11970c95..36b54a248df 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -223,9 +223,8 @@ static void diagnoseUseOfInternalDeclInInlineFunction(Sema &S, S.MaybeSuggestAddingStaticToDecl(Current); - S.Diag(D->getCanonicalDecl()->getLocation(), - diag::note_internal_decl_declared_here) - << D; + S.Diag(D->getCanonicalDecl()->getLocation(), diag::note_entity_declared_at) + << D; } void Sema::MaybeSuggestAddingStaticToDecl(const FunctionDecl *Cur) { @@ -11469,8 +11468,8 @@ diagnoseUncapturableValueReference(Sema &S, SourceLocation loc, << var->getIdentifier(); } - S.Diag(var->getLocation(), diag::note_local_variable_declared_here) - << var->getIdentifier(); + S.Diag(var->getLocation(), diag::note_entity_declared_at) + << var->getIdentifier(); // FIXME: Add additional diagnostic info about class etc. which prevents // capture. @@ -12586,9 +12585,8 @@ bool Sema::CheckCallReturnType(QualType ReturnType, SourceLocation Loc, S.Diag(Loc, diag::err_call_function_incomplete_return) << CE->getSourceRange() << FD->getDeclName() << T; - S.Diag(FD->getLocation(), - diag::note_function_with_incomplete_return_type_declared_here) - << FD->getDeclName(); + S.Diag(FD->getLocation(), diag::note_entity_declared_at) + << FD->getDeclName(); } } Diagnoser(FD, CE); |