Skip to content

Commit 961b9a5

Browse files
committed
Avoid aggregate init in Clang 17 still
There is a serious codegen bug with Clang aggregate init when working with concepts. llvm/llvm-project#61145
1 parent 9be3a37 commit 961b9a5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

subspace/macros/__private/compiler_bugs.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
#include "subspace/macros/compiler.h"
1919

2020
// TODO: https://github.com/llvm/llvm-project/issues/56394
21-
#if defined(__clang__) && __clang_major__ > 0 // TODO: Update when the bug is fixed.
21+
#if defined(__clang__) && \
22+
__clang_major__ > 0 // TODO: Update when the bug is fixed.
2223
#define sus_clang_bug_56394(...) __VA_ARGS__
2324
#define sus_clang_bug_56394_else(...)
2425
#else
@@ -27,7 +28,8 @@
2728
#endif
2829

2930
// TODO: https://github.com/llvm/llvm-project/issues/58835
30-
#if defined(__clang__) && __clang_major__ > 0 // TODO: Update when the bug is fixed.
31+
#if defined(__clang__) && \
32+
__clang_major__ > 0 // TODO: Update when the bug is fixed.
3133
#define sus_clang_bug_58835(...) __VA_ARGS__
3234
#define sus_clang_bug_58835_else(...)
3335
#else
@@ -50,8 +52,11 @@
5052
// TODO: https://github.com/llvm/llvm-project/issues/54050
5153
// Aggregate initialization fails on template classes due to lack of CTAD for
5254
// aggregates.
55+
//
56+
// There are still bugs with aggregate init in Clang 17:
57+
// https://github.com/llvm/llvm-project/issues/61145
5358
#if defined(__clang__) && \
54-
__clang_major__ <= 16 // TODO: Update when the bug is fixed.
59+
__clang_major__ <= 17 // TODO: Update when the bug is fixed.
5560
#define sus_clang_bug_54050(...) __VA_ARGS__
5661
#define sus_clang_bug_54050_else(...)
5762
#else

0 commit comments

Comments
 (0)