[clang] Fix error recovery while PTU cleanup (PR #127467)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 02:11:32 PST 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 ecb7f5aaeed2de738a79f1bb78b2196718007176 6ff448ed506e0ef75db2c9974a628a965e85df2f --extensions cpp -- clang/lib/Interpreter/IncrementalParser.cpp clang/unittests/Interpreter/InterpreterTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index 56ab155ebf..51ec1dfc4e 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -115,8 +115,12 @@ TEST_F(InterpreterTest, Errors) {
   RecoverErr = Interp->Parse("var1 = 424;");
   EXPECT_TRUE(!!RecoverErr);
 
-  Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError();
-  EXPECT_THAT(DiagnosticOutput, HasSubstr("error: non-local lambda expression cannot have a capture-default"));
+  Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };")
+            .takeError();
+  EXPECT_THAT(
+      DiagnosticOutput,
+      HasSubstr(
+          "error: non-local lambda expression cannot have a capture-default"));
   EXPECT_EQ("Parsing failed.", llvm::toString(std::move(Err)));
 
   RecoverErr = Interp->Parse("int validVar = 10;");

``````````

</details>


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


More information about the cfe-commits mailing list