[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 08:53:02 PDT 2024


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 b4feb26606de84ff53d9b65a3b79c00a2b4d7c22 9dab439803727470ce07e92a3dc5c46d9bb056b2 --extensions cpp,h -- clang/lib/Interpreter/InterpreterValuePrinter.cpp clang/include/clang/Frontend/MultiplexConsumer.h clang/include/clang/Interpreter/Interpreter.h clang/lib/Frontend/MultiplexConsumer.cpp clang/lib/Interpreter/DeviceOffload.cpp clang/lib/Interpreter/DeviceOffload.h clang/lib/Interpreter/IncrementalExecutor.cpp clang/lib/Interpreter/IncrementalParser.cpp clang/lib/Interpreter/IncrementalParser.h clang/lib/Interpreter/Interpreter.cpp clang/unittests/Interpreter/CodeCompletionTest.cpp clang/unittests/Interpreter/InterpreterExtensionsTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/include/clang/Interpreter/Interpreter.h b/clang/include/clang/Interpreter/Interpreter.h
index 9758141715..55e60d28a1 100644
--- a/clang/include/clang/Interpreter/Interpreter.h
+++ b/clang/include/clang/Interpreter/Interpreter.h
@@ -175,7 +175,7 @@ private:
 
   CodeGenerator *getCodeGen() const;
   std::unique_ptr<llvm::Module> GenModule();
-  PartialTranslationUnit & RegisterPTU(TranslationUnitDecl *TU);
+  PartialTranslationUnit &RegisterPTU(TranslationUnitDecl *TU);
 
   // A cache for the compiled destructors used to for de-allocation of managed
   // clang::Values.
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp
index e00cab0d20..808fc9b952 100644
--- a/clang/lib/Interpreter/Interpreter.cpp
+++ b/clang/lib/Interpreter/Interpreter.cpp
@@ -542,7 +542,7 @@ size_t Interpreter::getEffectivePTUSize() const {
   return PTUs.size() - InitPTUSize;
 }
 
-PartialTranslationUnit & Interpreter::RegisterPTU(TranslationUnitDecl *TU) {
+PartialTranslationUnit &Interpreter::RegisterPTU(TranslationUnitDecl *TU) {
   PTUs.emplace_back(PartialTranslationUnit());
   PartialTranslationUnit &LastPTU = PTUs.back();
   LastPTU.TUPart = TU;

``````````

</details>


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


More information about the cfe-commits mailing list