summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-17 21:27:43 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-17 21:27:43 +0000
commit419b1ff6774a7d9432a81df7f56b210ee7f0cc35 (patch)
treeb7aad30e8c3d4b968498680327e7c49f55cef2e9 /clang/lib/Sema
parenta7143b6a2b3e51b575935c3d9ea577aa6e0e7bab (diff)
downloadbcm5719-llvm-419b1ff6774a7d9432a81df7f56b210ee7f0cc35.tar.gz
bcm5719-llvm-419b1ff6774a7d9432a81df7f56b210ee7f0cc35.zip
Correctly resolve an overload set passed to an overloaded operator=. PR11784.
llvm-svn: 148335
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 26ca3a9cc01..33c8a83b40f 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud