summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 8f28ec2fb8a..36f24fd9c46 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -1481,23 +1481,6 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType,
.getTypePtr());
Changed = true;
}
-
- // Convert FromFPT's ExtParameterInfo if necessary. The conversion is valid
- // only if the ExtParameterInfo lists of the two function prototypes can be
- // merged and the merged list is identical to ToFPT's ExtParameterInfo list.
- SmallVector<FunctionProtoType::ExtParameterInfo, 4> NewParamInfos;
- bool CanUseToFPT, CanUseFromFPT;
- if (Context.mergeExtParameterInfo(ToFPT, FromFPT, CanUseToFPT,
- CanUseFromFPT, NewParamInfos) &&
- CanUseToFPT && !CanUseFromFPT) {
- FunctionProtoType::ExtProtoInfo ExtInfo = FromFPT->getExtProtoInfo();
- ExtInfo.ExtParameterInfos =
- NewParamInfos.empty() ? nullptr : NewParamInfos.data();
- QualType QT = Context.getFunctionType(FromFPT->getReturnType(),
- FromFPT->getParamTypes(), ExtInfo);
- FromFn = QT->getAs<FunctionType>();
- Changed = true;
- }
}
if (!Changed)
@@ -2680,12 +2663,8 @@ bool Sema::IsBlockPointerConversion(QualType FromType, QualType ToType,
// Argument types are too different. Abort.
return false;
}
-
- SmallVector<FunctionProtoType::ExtParameterInfo, 4> NewParamInfos;
- bool CanUseToFPT, CanUseFromFPT;
- if (!Context.mergeExtParameterInfo(ToFunctionType, FromFunctionType,
- CanUseToFPT, CanUseFromFPT,
- NewParamInfos))
+ if (!Context.doFunctionTypesMatchOnExtParameterInfos(FromFunctionType,
+ ToFunctionType))
return false;
ConvertedType = ToType;
OpenPOWER on IntegriCloud