Skip to content

Commit 08a12a9

Browse files
author
git apple-llvm automerger
committed
Merge commit '502a509e478a' from llvm.org/master into apple/master
2 parents b99156e + 502a509 commit 08a12a9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

clang/lib/Sema/SemaTemplateDeduction.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3826,8 +3826,7 @@ Sema::TemplateDeductionResult Sema::DeduceTemplateArguments(
38263826
if (Args.size() < Function->getMinRequiredArguments() && !PartialOverloading)
38273827
return TDK_TooFewArguments;
38283828
else if (TooManyArguments(NumParams, Args.size(), PartialOverloading)) {
3829-
const FunctionProtoType *Proto
3830-
= Function->getType()->getAs<FunctionProtoType>();
3829+
const auto *Proto = Function->getType()->castAs<FunctionProtoType>();
38313830
if (Proto->isTemplateVariadic())
38323831
/* Do nothing */;
38333832
else if (!Proto->isVariadic())
@@ -3965,11 +3964,8 @@ QualType Sema::adjustCCAndNoReturn(QualType ArgFunctionType,
39653964
if (ArgFunctionType.isNull())
39663965
return ArgFunctionType;
39673966

3968-
const FunctionProtoType *FunctionTypeP =
3969-
FunctionType->castAs<FunctionProtoType>();
3970-
const FunctionProtoType *ArgFunctionTypeP =
3971-
ArgFunctionType->getAs<FunctionProtoType>();
3972-
3967+
const auto *FunctionTypeP = FunctionType->castAs<FunctionProtoType>();
3968+
const auto *ArgFunctionTypeP = ArgFunctionType->castAs<FunctionProtoType>();
39733969
FunctionProtoType::ExtProtoInfo EPI = ArgFunctionTypeP->getExtProtoInfo();
39743970
bool Rebuild = false;
39753971

0 commit comments

Comments
 (0)