summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorTony Jiang <jtony@ca.ibm.com>2017-05-24 14:45:57 +0000
committerTony Jiang <jtony@ca.ibm.com>2017-05-24 14:45:57 +0000
commitedc7849b1bdd2250c0fb1ff679ef80b9aee72891 (patch)
tree4c6aafc6653391078fcdd06fcdf0ca1a34820e92 /clang/lib/Sema/SemaChecking.cpp
parent29ff638cbf0bc640778af7ccc25592833aa9e0a6 (diff)
downloadbcm5719-llvm-edc7849b1bdd2250c0fb1ff679ef80b9aee72891.tar.gz
bcm5719-llvm-edc7849b1bdd2250c0fb1ff679ef80b9aee72891.zip
Generalize two diagnostic messages to take function name as parameter.
llvm-svn: 303753
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 14dd6267b85..c383a16f713 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3914,7 +3914,8 @@ ExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {
if (!LHSType->isVectorType() || !RHSType->isVectorType())
return ExprError(Diag(TheCall->getLocStart(),
- diag::err_shufflevector_non_vector)
+ diag::err_vec_builtin_non_vector)
+ << TheCall->getDirectCallee()
<< SourceRange(TheCall->getArg(0)->getLocStart(),
TheCall->getArg(1)->getLocEnd()));
@@ -3928,12 +3929,14 @@ ExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {
if (!RHSType->hasIntegerRepresentation() ||
RHSType->getAs<VectorType>()->getNumElements() != numElements)
return ExprError(Diag(TheCall->getLocStart(),
- diag::err_shufflevector_incompatible_vector)
+ diag::err_vec_builtin_incompatible_vector)
+ << TheCall->getDirectCallee()
<< SourceRange(TheCall->getArg(1)->getLocStart(),
TheCall->getArg(1)->getLocEnd()));
} else if (!Context.hasSameUnqualifiedType(LHSType, RHSType)) {
return ExprError(Diag(TheCall->getLocStart(),
- diag::err_shufflevector_incompatible_vector)
+ diag::err_vec_builtin_incompatible_vector)
+ << TheCall->getDirectCallee()
<< SourceRange(TheCall->getArg(0)->getLocStart(),
TheCall->getArg(1)->getLocEnd()));
} else if (numElements != numResElements) {
OpenPOWER on IntegriCloud