summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-06 05:26:58 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-06 05:26:58 +0000
commit622114cfe3c7a2a4daf4edc2d2556200cbd1ee9d (patch)
tree74ef47bd4e75c711d21427438c7f468873e86625 /clang/lib/AST/ExprClassification.cpp
parent7ecd94cc0bded43bef6833980b901579ab3b440d (diff)
downloadbcm5719-llvm-622114cfe3c7a2a4daf4edc2d2556200cbd1ee9d.tar.gz
bcm5719-llvm-622114cfe3c7a2a4daf4edc2d2556200cbd1ee9d.zip
Clarify the logic for when to build an overloaded binop. In particular,
build one when either of the operands calls itself type-dependent; previously we were building when one of the operand types was dependent, which is not always the same thing and which can lead to unfortunate inconsistencies later. Fixes PR8739. llvm-svn: 120990
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r--clang/lib/AST/ExprClassification.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index 1afc7602fb9..a43bea298e3 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -515,7 +515,7 @@ static Cl::ModifiableType IsModifiable(ASTContext &Ctx, const Expr *E,
// Records with any const fields (recursively) are not modifiable.
if (const RecordType *R = CT->getAs<RecordType>()) {
- assert((isa<ObjCPropertyRefExpr>(E) ||
+ assert((E->getObjectKind() == OK_ObjCProperty ||
!Ctx.getLangOptions().CPlusPlus) &&
"C++ struct assignment should be resolved by the "
"copy assignment operator.");
OpenPOWER on IntegriCloud