diff options
author | John McCall <rjmccall@apple.com> | 2010-12-14 06:51:39 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-14 06:51:39 +0000 |
commit | 0e88aa7100da32acc63bc8a4dcb946ed517868f1 (patch) | |
tree | 1e40b8565309154c96cb5997ad4f615a0b8d6ff4 /lib/Sema/SemaLookup.cpp | |
parent | 54eeba75d3914e457204a159a7888fc19e50a6dc (diff) |
Factor out most of the extra state in a FunctionProtoType into a separate
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 6ff9cc69f1..d4db84b776 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -671,13 +671,14 @@ static bool LookupDirect(Sema &S, LookupResult &R, const DeclContext *DC) { // Compute the type of the function that we would expect the conversion // function to have, if it were to match the name given. // FIXME: Calling convention! - FunctionType::ExtInfo ConvProtoInfo = ConvProto->getExtInfo(); + FunctionProtoType::ExtProtoInfo EPI = ConvProto->getExtProtoInfo(); + EPI.ExtInfo = EPI.ExtInfo.withCallingConv(CC_Default); + EPI.HasExceptionSpec = false; + EPI.HasAnyExceptionSpec = false; + EPI.NumExceptions = 0; QualType ExpectedType = R.getSema().Context.getFunctionType(R.getLookupName().getCXXNameType(), - 0, 0, ConvProto->isVariadic(), - ConvProto->getTypeQuals(), - false, false, 0, 0, - ConvProtoInfo.withCallingConv(CC_Default)); + 0, 0, EPI); // Perform template argument deduction against the type that we would // expect the function to have. |