diff options
author | John McCall <rjmccall@apple.com> | 2010-12-06 05:26:58 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-06 05:26:58 +0000 |
commit | 01b2e4e3e2fbd60e62539f7e8e8b99575fa8a5b0 (patch) | |
tree | 7c2cf9e1e7da36c260b9d03ba619dc0617cea4b1 /lib/AST/ExprClassification.cpp | |
parent | 0074b48fb8ea5040de546c79be43916efe0c1f76 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprClassification.cpp')
-rw-r--r-- | lib/AST/ExprClassification.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ExprClassification.cpp b/lib/AST/ExprClassification.cpp index 1afc7602fb..a43bea298e 100644 --- a/lib/AST/ExprClassification.cpp +++ b/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."); |