AST: Remove overzealous assertion from IsModifiable
It's reasonable to ask if an l-value with class type is modifiable.
llvm-svn: 225121
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index 915ca16..933ea97 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -615,14 +615,9 @@
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;
}