summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-06-14 04:05:17 +0000
committerNico Weber <nicolasweber@gmx.de>2019-06-14 04:05:17 +0000
commit3d02b895eda08dda749a16c9499f3a11fd68793b (patch)
treeda36d6a87461e67af138453afafe5ffafd45d02b /clang/lib/AST/Expr.cpp
parent5b4285d82ded14b5f486df39fbef6aacdfbd8659 (diff)
downloadbcm5719-llvm-3d02b895eda08dda749a16c9499f3a11fd68793b.tar.gz
bcm5719-llvm-3d02b895eda08dda749a16c9499f3a11fd68793b.zip
Revert 363295, it caused PR42276. Also revert follow-ups 363337, 363340.
Revert 363340 "Remove unused SK_LValueToRValue initialization step." Revert 363337 "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type" Revert 363295 "C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression." llvm-svn: 363352
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 72e1119851b..77d444151c3 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -1885,11 +1885,6 @@ ImplicitCastExpr *ImplicitCastExpr::Create(const ASTContext &C, QualType T,
ExprValueKind VK) {
unsigned PathSize = (BasePath ? BasePath->size() : 0);
void *Buffer = C.Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
- // Per C++ [conv.lval]p3, lvalue-to-rvalue conversions on class and
- // std::nullptr_t have special semantics not captured by CK_LValueToRValue.
- assert((Kind != CK_LValueToRValue ||
- !(T->isNullPtrType() || T->getAsCXXRecordDecl())) &&
- "invalid type for lvalue-to-rvalue conversion");
ImplicitCastExpr *E =
new (Buffer) ImplicitCastExpr(T, Kind, Operand, PathSize, VK);
if (PathSize)
OpenPOWER on IntegriCloud