diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-11 00:52:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-11 00:52:39 +0000 |
commit | e5b5220072c52c3ca1ef5106f4a62928df233c78 (patch) | |
tree | e538d5b3d2fc3a36bf1a3e83ee390591eced69a3 /clang/lib/Sema/SemaOverload.cpp | |
parent | 9a40ae8935a163c632d2669093e554465927cb8a (diff) | |
download | bcm5719-llvm-e5b5220072c52c3ca1ef5106f4a62928df233c78.tar.gz bcm5719-llvm-e5b5220072c52c3ca1ef5106f4a62928df233c78.zip |
PR17075: When performing partial ordering of a member function against a
non-member function, the number of arguments in the two candidate calls
will be different (the non-member call will have one extra argument).
We used to get confused by this, and fail to compare the last argument
when testing whether the member is better, resulting in us always
thinking it is, even if the non-member is more specialized in the last
argument.
llvm-svn: 190470
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index ea4fe10eac1..c7620e49f7c 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -7962,7 +7962,8 @@ isBetterOverloadCandidate(Sema &S, Loc, isa<CXXConversionDecl>(Cand1.Function)? TPOC_Conversion : TPOC_Call, - Cand1.ExplicitCallArguments)) + Cand1.ExplicitCallArguments, + Cand2.ExplicitCallArguments)) return BetterTemplate == Cand1.Function->getPrimaryTemplate(); } |