[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 8 08:19:19 PDT 2024


Pol Marcet =?utf-8?q?Sardà?= <polmarcetsarda at gmail.com>,
Pol Marcet =?utf-8?q?Sardà?= <polmarcetsarda at gmail.com>,
Pol Marcet =?utf-8?q?Sardà?= <polmarcetsarda at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/76615 at github.com>


================
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only %s
+// expected-no-diagnostics
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
----------------
sethp wrote:

Well, I got a quick demo of what I was thinking put together. For your consideration: https://github.com/llvm/llvm-project/commit/17c78a28b4f441bf284bcf6935061938ec908f31

It did & didn't work out quite the way I'd hoped: I'd forgotten just how, uh, _peculiar_ the preprocessor is, especially if you're trying to get it to generate human-readable output. There might be a way to do it nicely (adding `clang-format` into the pipeline?), or it might not be an idea worth pursuing at all. I'll leave the final determination up to you & @erichkeane .

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


More information about the cfe-commits mailing list