[cfe-commits] r64027 - /cfe/trunk/lib/AST/StmtPrinter.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Sat Feb 7 12:05:48 PST 2009


Author: cornedbee
Date: Sat Feb  7 14:05:48 2009
New Revision: 64027

URL: http://llvm.org/viewvc/llvm-project?rev=64027&view=rev
Log:
Fix pretty-printing of if conditions. Patch by Ben Lickly.

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

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

==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Sat Feb  7 14:05:48 2009
@@ -202,8 +202,9 @@
 }
 
 void StmtPrinter::PrintRawIfStmt(IfStmt *If) {
-  OS << "if ";
+  OS << "if (";
   PrintExpr(If->getCond());
+  OS << ')';
   
   if (CompoundStmt *CS = dyn_cast<CompoundStmt>(If->getThen())) {
     OS << ' ';





More information about the cfe-commits mailing list