[clang] [clang-repl] Added -hip option (PR #231783)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 18 10:28:55 PDT 2026


================
@@ -0,0 +1,11 @@
+// Check that clang-repl sets up the HIP environment but reports that HIP
+// offload binary generation is not supported yet. An explicit --offload-arch
+// is passed so the test does not rely on GPU auto-detection. No device code
+// is run, so the architecture is arbitrary.
+// FIXME: Replace this with real HIP execution tests once the HIP device parser
+// can generate offload binaries.
+
+// RUN: cat %s | clang-repl -hip --offload-arch=gfx1100 2>&1 | FileCheck %s
----------------
yxsamliu wrote:

This sends the comments to clang-repl before `f`. A comment can produce the expected error, so the test may pass without checking `f`. Could we send the declaration as one input instead?

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


More information about the cfe-commits mailing list