diff options
| author | Mike Stump <mrs@apple.com> | 2009-11-17 00:45:21 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-11-17 00:45:21 +0000 |
| commit | c2c03349f35662eeba595af9ca9eca20ae1dc900 (patch) | |
| tree | d504e6792adc718398571aecbc63e56e9b324f5a /clang/lib/CodeGen | |
| parent | 7c57c41d5f8e700151c5eeb2b7e0e65f4d3149a1 (diff) | |
| download | bcm5719-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.cpp | 2 |
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) { |

