[llvm] [NFC][LLVM][Support] Misc code cleanup in ScopedPrinter (PR #161462)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 08:22:56 PDT 2025


================
@@ -220,59 +220,59 @@ class LLVM_ABI ScopedPrinter {
   }
 
   virtual void printNumber(StringRef Label, char Value) {
-    startLine() << Label << ": " << static_cast<int>(Value) << "\n";
+    startLine() << Label << ": " << static_cast<int>(Value) << '\n';
----------------
jurahul wrote:

In several of my earlier code reviews on tablegen side, the feedback has been to use single character instead of a string for these cases. Even the LLVM CS has this example: https://llvm.org/docs/CodingStandards.html#avoid-std-endl

> Most of the time, you probably have no reason to flush the output stream, so it’s better to use a literal '\n'.


https://github.com/llvm/llvm-project/pull/161462


More information about the llvm-commits mailing list