@@ -5562,7 +5562,7 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
5562
5562
if (NumArgs < 2)
5563
5563
return ExprError(Diag(TheCall->getEndLoc(),
5564
5564
diag::err_typecheck_call_too_few_args_at_least)
5565
- << 0 /*function call*/ << 2 << TheCall->getNumArgs()
5565
+ << 0 /*function call*/ << 2 << NumArgs
5566
5566
<< /*is non object*/ 0 << TheCall->getSourceRange());
5567
5567
5568
5568
// Determine which of the following types of shufflevector we're checking:
@@ -5579,17 +5579,17 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
5579
5579
if (!LHSType->isVectorType() || !RHSType->isVectorType())
5580
5580
return ExprError(
5581
5581
Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_non_vector)
5582
- << TheCall->getDirectCallee() << /*isMorethantwoArgs */ false
5582
+ << TheCall->getDirectCallee() << /*isMoreThanTwoArgs */ false
5583
5583
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
5584
5584
TheCall->getArg(1)->getEndLoc()));
5585
5585
5586
5586
NumElements = LHSType->castAs<VectorType>()->getNumElements();
5587
- unsigned NumResElements = TheCall->getNumArgs() - 2;
5587
+ unsigned NumResElements = NumArgs - 2;
5588
5588
5589
5589
// Check to see if we have a call with 2 vector arguments, the unary shuffle
5590
5590
// with mask. If so, verify that RHS is an integer vector type with the
5591
5591
// same number of elts as lhs.
5592
- if (TheCall->getNumArgs() == 2) {
5592
+ if (NumArgs == 2) {
5593
5593
if (!RHSType->hasIntegerRepresentation() ||
5594
5594
RHSType->castAs<VectorType>()->getNumElements() != NumElements)
5595
5595
return ExprError(Diag(TheCall->getBeginLoc(),
@@ -5606,10 +5606,10 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
5606
5606
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
5607
5607
TheCall->getArg(1)->getEndLoc()));
5608
5608
} else if (NumElements != NumResElements) {
5609
- QualType eltType = LHSType->castAs<VectorType>()->getElementType();
5609
+ QualType EltType = LHSType->castAs<VectorType>()->getElementType();
5610
5610
ResType = ResType->isExtVectorType()
5611
- ? Context.getExtVectorType(eltType , NumResElements)
5612
- : Context.getVectorType(eltType , NumResElements,
5611
+ ? Context.getExtVectorType(EltType , NumResElements)
5612
+ : Context.getVectorType(EltType , NumResElements,
5613
5613
VectorKind::Generic);
5614
5614
}
5615
5615
}
0 commit comments