1 // RUN: %clang_cc1 -std=c++1z -verify -emit-llvm-only %s
2 // expected-no-diagnostics
4 // rdar://problem/33888545
5 template <unsigned int BUFFER_SIZE
> class Buffer
{};
12 template <unsigned int N
> A
parse(Buffer
<N
> buffer
);
14 template<unsigned int N
>
15 void init_in_if(Buffer
<N
> buffer
) {
16 if (A a
= parse(buffer
); a
.status
> 0) {
20 template<unsigned int N
>
21 void init_in_switch(Buffer
<N
> buffer
) {
22 switch (A a
= parse(buffer
); a
.status
) {
31 init_in_switch(buffer
);