summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-07-18 19:53:21 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-07-18 19:53:21 +0000
commit18a9ac91295eaf8f5bf3145b57450a04b393f247 (patch)
tree9a0256322b3644d6682684c246e42f3f99dadcce /clang/lib/CodeGen/CGExprCXX.cpp
parent4fbb1b9f98616d625c2fc1d2081cfa64ca8d5b87 (diff)
downloadbcm5719-llvm-18a9ac91295eaf8f5bf3145b57450a04b393f247.tar.gz
bcm5719-llvm-18a9ac91295eaf8f5bf3145b57450a04b393f247.zip
Address Richard's comments.
llvm-svn: 213402
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprCXX.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index f09c279d0c9..8cadd6c1eb2 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/lib/CodeGen/CGExprCXX.cpp
@@ -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;
OpenPOWER on IntegriCloud