diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-08 21:03:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-08 21:03:17 +0000 |
commit | ccd471341d2edbb18ac9c46a7c65d280d9c6223e (patch) | |
tree | fadfcdd56174e64e25a15042b5718447b5bcf653 /lib/Sema | |
parent | ac7362dedab6002a0811f47ccfcaf81a9c728d35 (diff) |
A built-in overload candidate is consider a non-template function when
determining whether one overload candidate is better than
another. Fixes PR7319.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 6a020d57d3..d746ec3f6d 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -4955,7 +4955,7 @@ Sema::isBetterOverloadCandidate(const OverloadCandidate& Cand1, // - F1 is a non-template function and F2 is a function template // specialization, or, if not that, - if (Cand1.Function && !Cand1.Function->getPrimaryTemplate() && + if ((!Cand1.Function || !Cand1.Function->getPrimaryTemplate()) && Cand2.Function && Cand2.Function->getPrimaryTemplate()) return true; |