Fix pretty-printing of if conditions. Patch by Ben Lickly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index 1f07db7..49292af 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -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 << ' ';