[clang] [clang-repl] Improve error message on failed undos (PR #149396)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 21 01:46:33 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/Interpreter/Interpreter.cpp clang/unittests/Interpreter/InterpreterTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp
index 64c6bcf3f..9b714860c 100644
--- a/clang/lib/Interpreter/Interpreter.cpp
+++ b/clang/lib/Interpreter/Interpreter.cpp
@@ -767,8 +767,9 @@ llvm::Error Interpreter::Undo(unsigned N) {
                                                std::error_code());
   } else if (N > getEffectivePTUSize()) {
     return llvm::make_error<llvm::StringError>(
-        llvm::formatv("Operation failed. Wanted to undo {0} inputs, only have {1}.",
-            N, getEffectivePTUSize()),
+        llvm::formatv(
+            "Operation failed. Wanted to undo {0} inputs, only have {1}.", N,
+            getEffectivePTUSize()),
         std::error_code());
   }
 

``````````

</details>


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


More information about the cfe-commits mailing list