[cfe-commits] r51594 - /cfe/trunk/lib/AST/Expr.cpp

Eli Friedman eli.friedman at gmail.com
Tue May 27 08:24:05 PDT 2008


Author: efriedma
Date: Tue May 27 10:24:04 2008
New Revision: 51594

URL: http://llvm.org/viewvc/llvm-project?rev=51594&view=rev
Log:
Assume statement expressions have side effects; this gets rid of a lot 
of extra warnings in the Python source.


Modified:
    cfe/trunk/lib/AST/Expr.cpp

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=51594&r1=51593&r2=51594&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Tue May 27 10:24:04 2008
@@ -319,14 +319,17 @@
     // If the base pointer or element is to a volatile pointer/field, accessing
     // if is a side effect.
     return getType().isVolatileQualified();
-    
+
   case CallExprClass:
     // TODO: check attributes for pure/const.   "void foo() { strlen("bar"); }"
     // should warn.
     return true;
   case ObjCMessageExprClass:
     return true;
-    
+  case StmtExprClass:
+    // TODO: check the inside of the statement expression
+    return true;
+
   case CastExprClass:
     // If this is a cast to void, check the operand.  Otherwise, the result of
     // the cast is unused.





More information about the cfe-commits mailing list