Skip to content

Commit cef3544

Browse files
committed
A few more things
1 parent 1ee924c commit cef3544

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5562,7 +5562,7 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
55625562
if (NumArgs < 2)
55635563
return ExprError(Diag(TheCall->getEndLoc(),
55645564
diag::err_typecheck_call_too_few_args_at_least)
5565-
<< 0 /*function call*/ << 2 << TheCall->getNumArgs()
5565+
<< 0 /*function call*/ << 2 << NumArgs
55665566
<< /*is non object*/ 0 << TheCall->getSourceRange());
55675567

55685568
// Determine which of the following types of shufflevector we're checking:
@@ -5579,17 +5579,17 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
55795579
if (!LHSType->isVectorType() || !RHSType->isVectorType())
55805580
return ExprError(
55815581
Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_non_vector)
5582-
<< TheCall->getDirectCallee() << /*isMorethantwoArgs*/ false
5582+
<< TheCall->getDirectCallee() << /*isMoreThanTwoArgs*/ false
55835583
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
55845584
TheCall->getArg(1)->getEndLoc()));
55855585

55865586
NumElements = LHSType->castAs<VectorType>()->getNumElements();
5587-
unsigned NumResElements = TheCall->getNumArgs() - 2;
5587+
unsigned NumResElements = NumArgs - 2;
55885588

55895589
// Check to see if we have a call with 2 vector arguments, the unary shuffle
55905590
// with mask. If so, verify that RHS is an integer vector type with the
55915591
// same number of elts as lhs.
5592-
if (TheCall->getNumArgs() == 2) {
5592+
if (NumArgs == 2) {
55935593
if (!RHSType->hasIntegerRepresentation() ||
55945594
RHSType->castAs<VectorType>()->getNumElements() != NumElements)
55955595
return ExprError(Diag(TheCall->getBeginLoc(),
@@ -5606,10 +5606,10 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
56065606
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
56075607
TheCall->getArg(1)->getEndLoc()));
56085608
} else if (NumElements != NumResElements) {
5609-
QualType eltType = LHSType->castAs<VectorType>()->getElementType();
5609+
QualType EltType = LHSType->castAs<VectorType>()->getElementType();
56105610
ResType = ResType->isExtVectorType()
5611-
? Context.getExtVectorType(eltType, NumResElements)
5612-
: Context.getVectorType(eltType, NumResElements,
5611+
? Context.getExtVectorType(EltType, NumResElements)
5612+
: Context.getVectorType(EltType, NumResElements,
56135613
VectorKind::Generic);
56145614
}
56155615
}

0 commit comments

Comments
 (0)