[PATCH] D51825: [analyzer] Use correct end-of-line character when printing statements for exploded graph

George Karpenkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 19:04:22 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL342312: [analyzer] Use correct end-of-line character when printing statements for… (authored by george.karpenkov, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D51825?vs=164550&id=165628#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51825

Files:
  cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp


Index: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -3071,12 +3071,14 @@
             if (const auto *C = dyn_cast<CaseStmt>(Label)) {
               Out << "\\lcase ";
               if (C->getLHS())
-                C->getLHS()->printPretty(Out, nullptr,
-                                         Context.getPrintingPolicy());
+                C->getLHS()->printPretty(
+                    Out, nullptr, Context.getPrintingPolicy(),
+                    /*Indentation=*/0, /*NewlineSymbol=*/"\\l");
 
               if (const Stmt *RHS = C->getRHS()) {
                 Out << " .. ";
-                RHS->printPretty(Out, nullptr, Context.getPrintingPolicy());
+                RHS->printPretty(Out, nullptr, Context.getPrintingPolicy(),
+                                 /*Indetation=*/0, /*NewlineSymbol=*/"\\l");
               }
 
               Out << ":";
@@ -3108,7 +3110,8 @@
 
       Out << S->getStmtClassName() << ' '
           << S->getID(Context) << " (" << (const void *)S << ") ";
-      S->printPretty(Out, nullptr, Context.getPrintingPolicy());
+      S->printPretty(Out, /*helper=*/nullptr, Context.getPrintingPolicy(),
+                     /*Indentation=*/2, /*NewlineSymbol=*/"\\l");
       printLocation(Out, S->getBeginLoc());
 
       if (Loc.getAs<PreStmt>())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51825.165628.patch
Type: text/x-patch
Size: 1472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180915/5537174d/attachment.bin>


More information about the llvm-commits mailing list