summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-07-11 20:53:51 +0000
committerAlp Toker <alp@nuanti.com>2014-07-11 20:53:51 +0000
commit5d96e0a3a79534f4ab6fb91f4cfa3e01e199f26e (patch)
tree2c961bd7cc507d3848139353817fbb7477bbdff7 /clang/lib/Sema/SemaChecking.cpp
parent4ce9863d0bc423bb4616e6ca14337e6c900339b8 (diff)
downloadbcm5719-llvm-5d96e0a3a79534f4ab6fb91f4cfa3e01e199f26e.tar.gz
bcm5719-llvm-5d96e0a3a79534f4ab6fb91f4cfa3e01e199f26e.zip
Consolidate header inclusion diagnostics
Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. llvm-svn: 212845
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index f7d56231885..976f3a696df 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3867,7 +3867,8 @@ static void emitReplacement(Sema &S, SourceLocation Loc, SourceRange Range,
if (!EmitHeaderHint)
return;
- S.Diag(Loc, diag::note_please_include_header) << HeaderName << FunctionName;
+ S.Diag(Loc, diag::note_include_header_or_declare) << HeaderName
+ << FunctionName;
}
static bool IsFunctionStdAbs(const FunctionDecl *FDecl) {
@@ -3907,8 +3908,8 @@ void Sema::CheckAbsoluteValueFunction(const CallExpr *Call,
QualType ArgType = Call->getArg(0)->IgnoreParenImpCasts()->getType();
QualType ParamType = Call->getArg(0)->getType();
- // Unsigned types can not be negative. Suggest to drop the absolute value
- // function.
+ // Unsigned types cannot be negative. Suggest removing the absolute value
+ // function call.
if (ArgType->isUnsignedIntegerType()) {
const char *FunctionName =
IsStdAbs ? "std::abs" : Context.BuiltinInfo.GetName(AbsKind);
OpenPOWER on IntegriCloud