[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / SemaCXX / cxx1z-init-statement-template.cpp
blobcedd2c720d90930776c75ed6fff02ff4fdfc2b37
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 {};
7 class A {
8 public:
9 int status;
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) {
23 default:
24 break;
28 void test() {
29 Buffer<10> buffer;
30 init_in_if(buffer);
31 init_in_switch(buffer);