aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CheckSizeofPointer.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-11-10 08:33:44 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-11-10 08:33:44 +0000
commitb6aa69ae31ec78fc41cec5b8f705761d3bb2a8bd (patch)
treeeabdf251bc899ca6d3a76ddcb22c455b3a39d696 /lib/Analysis/CheckSizeofPointer.cpp
parentcdc89c485cde6aaa8c8e83f920cb25ddf7876a75 (diff)
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
Diffstat (limited to 'lib/Analysis/CheckSizeofPointer.cpp')
-rw-r--r--lib/Analysis/CheckSizeofPointer.cpp2
1 files changed, 1 insertions, 1 deletions
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<DeclRefExpr>(ArgEx))
+ if (!isa<DeclRefExpr>(ArgEx->IgnoreParens()))
return;
SourceRange R = ArgEx->getSourceRange();