[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 7: Constexpr support and tests) (PR #169686)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 1 09:50:24 PST 2025
================
@@ -0,0 +1,1042 @@
+// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -fdeclspec -fblocks -verify
+namespace std {
+template <typename T>
+struct initializer_list {
+ const T* a;
+ const T* b;
+ initializer_list(T* a, T* b): a{a}, b{b} {}
+};
+}
+
+struct S {
+ int x;
+ constexpr S(int x) : x{x} {}
+};
+
+void g(int); // #g
+template <int n> constexpr int tg() { return n; }
+
+void f1() {
+ template for (auto x : {}) static_assert(false, "discarded");
----------------
Sirraide wrote:
I also forgot to check for incomplete types, which currently crashes; I’ll fix that and add a test for that as well.
https://github.com/llvm/llvm-project/pull/169686
More information about the llvm-branch-commits
mailing list