Skip to content

Commit f74f86c

Browse files
committed
Add test case
1 parent 1ce0335 commit f74f86c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/test/SemaCXX/attr-section.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ struct A {
7777
static constexpr B b{nullptr}; // This used to crash.
7878
};
7979

80+
struct B1 { void *p; };
81+
template <class T>
82+
struct A1 {
83+
__attribute__((section("non_trivial_ctor")))
84+
static constexpr B1 b{nullptr}; // no diagnostic expected
85+
};
86+
8087
template <class T>
8188
struct C {
8289
__attribute__((section("non_trivial_ctor")))

0 commit comments

Comments
 (0)