]> granicus.if.org Git - clang/commitdiff
Ignore parentheses when check the type of the expr.
authorZhongxing Xu <xuzhongxing@gmail.com>
Tue, 10 Nov 2009 08:33:44 +0000 (08:33 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Tue, 10 Nov 2009 08:33:44 +0000 (08:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86677 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CheckSizeofPointer.cpp

index 1aab3c973d6eb963f07c26d49085ecb9cfc9a6f3..174beefbca45195b97e2fad4d113c2f6bfcd190b 100644 (file)
@@ -54,7 +54,7 @@ void WalkAST::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) {
     // because people know what they are doing when they intentionally 
     // dereference the pointer.
     Expr *ArgEx = E->getArgumentExpr();
-    if (!isa<DeclRefExpr>(ArgEx))
+    if (!isa<DeclRefExpr>(ArgEx->IgnoreParens()))
       return;
 
     SourceRange R = ArgEx->getSourceRange();