diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-09-23 20:31:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-09-23 20:31:39 +0000 |
commit | 0daabd7ebe5e51bc87808150f23e41432ababb2c (patch) | |
tree | 40785b42fa4897194eee6e5a2aff7ce0834322de /clang/lib/Sema/SemaExpr.cpp | |
parent | dedef3325f08e506e5b07d167579f39f817015f6 (diff) | |
download | bcm5719-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.cpp | 2 |
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); |