summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-01-04 00:44:32 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-01-04 00:44:32 +0000
commit99b98f07d4b076a6aae4966ccb8b1d613ede0898 (patch)
tree4d2a29758d8a6570f14f4fb09ead9b6addef7ce1 /clang/lib/AST/ExprClassification.cpp
parentddd926441e7ff9b4b4217fbeea14ef79481021d2 (diff)
downloadbcm5719-llvm-99b98f07d4b076a6aae4966ccb8b1d613ede0898.tar.gz
bcm5719-llvm-99b98f07d4b076a6aae4966ccb8b1d613ede0898.zip
AST: Remove overzealous assertion from IsModifiable
It's reasonable to ask if an l-value with class type is modifiable. llvm-svn: 225121
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r--clang/lib/AST/ExprClassification.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index 915ca161c91..933ea97fa2b 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -615,14 +615,9 @@ static Cl::ModifiableType IsModifiable(ASTContext &Ctx, const Expr *E,
return Cl::CM_IncompleteType;
// Records with any const fields (recursively) are not modifiable.
- if (const RecordType *R = CT->getAs<RecordType>()) {
- assert((E->getObjectKind() == OK_ObjCProperty ||
- !Ctx.getLangOpts().CPlusPlus) &&
- "C++ struct assignment should be resolved by the "
- "copy assignment operator.");
+ if (const RecordType *R = CT->getAs<RecordType>())
if (R->hasConstFields())
return Cl::CM_ConstQualified;
- }
return Cl::CM_Modifiable;
}
OpenPOWER on IntegriCloud