summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-09-23 20:31:39 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-09-23 20:31:39 +0000
commit0daabd7ebe5e51bc87808150f23e41432ababb2c (patch)
tree40785b42fa4897194eee6e5a2aff7ce0834322de /clang/lib/Sema/SemaExpr.cpp
parentdedef3325f08e506e5b07d167579f39f817015f6 (diff)
downloadbcm5719-llvm-0daabd7ebe5e51bc87808150f23e41432ababb2c.tar.gz
bcm5719-llvm-0daabd7ebe5e51bc87808150f23e41432ababb2c.zip
Don't perform ADL when looking up operator=; there is no non-member form of
that function, and apart from being slow, this is unnecessary: ADL can trigger instantiations that are not permitted here. The standard isn't *completely* clear here, but this seems like the intent, and in any case this approach is permitted by [temp.inst]p7. llvm-svn: 218330
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 50bc4d2ac8b..5edabc03b69 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9704,7 +9704,7 @@ static ExprResult BuildOverloadedBinOp(Sema &S, Scope *Sc, SourceLocation OpLoc,
UnresolvedSet<16> Functions;
OverloadedOperatorKind OverOp
= BinaryOperator::getOverloadedOperator(Opc);
- if (Sc && OverOp != OO_None)
+ if (Sc && OverOp != OO_None && OverOp != OO_Equal)
S.LookupOverloadedOperatorName(OverOp, Sc, LHS->getType(),
RHS->getType(), Functions);
OpenPOWER on IntegriCloud