[cfe-commits] r86677 - /cfe/trunk/lib/Analysis/CheckSizeofPointer.cpp

Zhongxing Xu xuzhongxing at gmail.com
Tue Nov 10 00:33:44 PST 2009


Author: zhongxingxu
Date: Tue Nov 10 02:33:44 2009
New Revision: 86677

URL: http://llvm.org/viewvc/llvm-project?rev=86677&view=rev
Log:
Ignore parentheses when check the type of the expr.

Modified:
    cfe/trunk/lib/Analysis/CheckSizeofPointer.cpp

Modified: cfe/trunk/lib/Analysis/CheckSizeofPointer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CheckSizeofPointer.cpp?rev=86677&r1=86676&r2=86677&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CheckSizeofPointer.cpp (original)
+++ cfe/trunk/lib/Analysis/CheckSizeofPointer.cpp Tue Nov 10 02:33:44 2009
@@ -54,7 +54,7 @@
     // 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();





More information about the cfe-commits mailing list