summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-05-28 12:20:14 +0000
committerAlp Toker <alp@nuanti.com>2014-05-28 12:20:14 +0000
commitaf940ca85c35a8b5edd1390763ef56f9e06023e1 (patch)
tree504259d1b817c175e82edeb2e8ef53b172e674b4 /lib/Sema/SemaExpr.cpp
parent05cebba1a22b1f03bd5d535f2ba2fb9442149c7a (diff)
downloadclang-af940ca85c35a8b5edd1390763ef56f9e06023e1.tar.gz
clang-af940ca85c35a8b5edd1390763ef56f9e06023e1.tar.bz2
clang-af940ca85c35a8b5edd1390763ef56f9e06023e1.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index a9f11970c9..36b54a248d 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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);