Skip to content
Snippets Groups Projects
Commit 595a3147 authored by David Majnemer's avatar David Majnemer
Browse files

Address Richard's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213402 91177308-0d34-0410-b5e6-96231b3b80d8
parent 5999ae2d
No related branches found
No related tags found
No related merge requests found
......@@ -1618,6 +1618,9 @@ void CodeGenFunction::EmitCXXDeleteExpr(const CXXDeleteExpr *E) {
static bool isGLValueFromPointerDeref(const Expr *E) {
E = E->IgnoreParenCasts();
if (isa<ArraySubscriptExpr>(E))
return true;
if (const auto *UO = dyn_cast<UnaryOperator>(E))
if (UO->getOpcode() == UO_Deref)
return true;
......
......@@ -42,3 +42,13 @@ void f7(A *x) { typeid((*x)); }
// CHECK-LABEL: define void @_Z2f7P1A
// CHECK: icmp eq {{.*}}, null
// CHECK-NEXT: br i1
void f8(A *x) { typeid(x[0]); }
// CHECK-LABEL: define void @_Z2f8P1A
// CHECK: icmp eq {{.*}}, null
// CHECK-NEXT: br i1
void f9(A *x) { typeid(0[x]); }
// CHECK-LABEL: define void @_Z2f9P1A
// CHECK: icmp eq {{.*}}, null
// CHECK-NEXT: br i1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment