summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-11-17 00:45:21 +0000
committerMike Stump <mrs@apple.com>2009-11-17 00:45:21 +0000
commitc2c03349f35662eeba595af9ca9eca20ae1dc900 (patch)
treed504e6792adc718398571aecbc63e56e9b324f5a /clang/lib/CodeGen
parent7c57c41d5f8e700151c5eeb2b7e0e65f4d3149a1 (diff)
downloadbcm5719-llvm-c2c03349f35662eeba595af9ca9eca20ae1dc900.tar.gz
bcm5719-llvm-c2c03349f35662eeba595af9ca9eca20ae1dc900.zip
Ensure we peer through () when handling typeid(*p).
llvm-svn: 89015
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCXXExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCXXExpr.cpp b/clang/lib/CodeGen/CGCXXExpr.cpp
index eff432a05c0..75740af0744 100644
--- a/clang/lib/CodeGen/CGCXXExpr.cpp
+++ b/clang/lib/CodeGen/CGCXXExpr.cpp
@@ -372,7 +372,7 @@ llvm::Value * CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) {
// We need to do a zero check for *p, unless it has NonNullAttr.
// FIXME: PointerType->hasAttr<NonNullAttr>()
bool CanBeZero = false;
- if (UnaryOperator *UO = dyn_cast<UnaryOperator>(subE))
+ if (UnaryOperator *UO = dyn_cast<UnaryOperator>(subE->IgnoreParens()))
if (UO->getOpcode() == UnaryOperator::Deref)
CanBeZero = true;
if (CanBeZero) {
OpenPOWER on IntegriCloud