[clang] [clan-repl] : Fix clang-repl crash with --cuda flag (PR #136404)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 18 21:36:16 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,h -- clang/include/clang/Interpreter/Interpreter.h clang/lib/Interpreter/DeviceOffload.cpp clang/lib/Interpreter/Interpreter.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 20d22c443..7425797c5 100644
--- a/clang/include/clang/Interpreter/Interpreter.h
+++ b/clang/include/clang/Interpreter/Interpreter.h
@@ -130,7 +130,7 @@ public:
virtual ~Interpreter();
static llvm::Expected<std::unique_ptr<Interpreter>>
create(std::unique_ptr<CompilerInstance> CI,
- std::unique_ptr<CompilerInstance> DeviceCI = nullptr);
+ std::unique_ptr<CompilerInstance> DeviceCI = nullptr);
static llvm::Expected<std::unique_ptr<Interpreter>>
createWithCUDA(std::unique_ptr<CompilerInstance> CI,
std::unique_ptr<CompilerInstance> DCI);
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp
index 1af3f2477..049cc00cd 100644
--- a/clang/lib/Interpreter/Interpreter.cpp
+++ b/clang/lib/Interpreter/Interpreter.cpp
@@ -473,7 +473,7 @@ Interpreter::create(std::unique_ptr<CompilerInstance> CI,
// if (DeviceErr)
// return std::move(DeviceErr);
- //DeviceCI->ExecuteAction(*DeviceAct);
+ // DeviceCI->ExecuteAction(*DeviceAct);
DeviceCI->ExecuteAction(*Interp->Act);
llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> IMVFS =
``````````
</details>
https://github.com/llvm/llvm-project/pull/136404
More information about the cfe-commits
mailing list