diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-01-17 21:27:43 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-01-17 21:27:43 +0000 |
commit | 8788491e10a24e70b7282f312c22d74ac478c899 (patch) | |
tree | b4a79450615204d3951d93ca13378219a35d6684 /lib/Sema/SemaExpr.cpp | |
parent | 7d580a4e9e47dffc3c17aa2b957ac57ca3c4e451 (diff) |
Correctly resolve an overload set passed to an overloaded operator=. PR11784.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 26ca3a9cc0..33c8a83b40 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -8159,6 +8159,9 @@ ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc, if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); + if (LHSExpr->getType()->isOverloadableType()) + return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); + return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); } |