[Mlir-commits] [mlir] [mlir][emitc] Fix creating pointer from constant array (PR #162083)

Gil Rapaport llvmlistbot at llvm.org
Fri Dec 19 08:36:28 PST 2025


================
@@ -1,5 +1,11 @@
 // RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s -check-prefix=CPP-DEFAULT
 // RUN: mlir-translate -mlir-to-cpp -declare-variables-at-top %s | FileCheck %s -check-prefix=CPP-DECLTOP
+// check that the generated code is syntactically valid
+// RUN: mlir-translate -mlir-to-cpp %s | %host_cxx -fsyntax-only -x c++ -
----------------
aniragil wrote:

Hmmm ... not sure about testing here this way.
There seem to be many `-fsyntax-only` tests in clang and flang, but they're testing themselves (I couldn't find usage of `%host_cxx` for lit tests).
None of our our other translator tests employs such a test, any reason to introduce it here?

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


More information about the Mlir-commits mailing list