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

via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 31 19:34:28 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:

My suggestion was not so much a way to avoid spelling them all out as to trick the preprocessor into doing (a lot of) the work. I'll try to put together a toy example in the next couple of days, but if you run `clang -E` on the existing file and commit the resulting spellings you'll get much of the way to what I was thinking. 

Would that address your concern, @erichkeane?

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


More information about the cfe-commits mailing list