parent
4fbb1b9f98
commit
18a9ac9129
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue