From: Zhongxing Xu Date: Tue, 10 Nov 2009 08:33:44 +0000 (+0000) Subject: Ignore parentheses when check the type of the expr. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6aa69ae31ec78fc41cec5b8f705761d3bb2a8bd;p=clang Ignore parentheses when check the type of the expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86677 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/CheckSizeofPointer.cpp b/lib/Analysis/CheckSizeofPointer.cpp index 1aab3c973d..174beefbca 100644 --- a/lib/Analysis/CheckSizeofPointer.cpp +++ b/lib/Analysis/CheckSizeofPointer.cpp @@ -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(ArgEx)) + if (!isa(ArgEx->IgnoreParens())) return; SourceRange R = ArgEx->getSourceRange();