[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / PR20334-std_initializer_list_diagnosis_assertion.cpp
blobec672089b84aaa355303189214ee3b52ef1e1465
1 // RUN: %clang_cc1 -std=c++11 -verify -emit-llvm-only %s
2 // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s -DCPP98
4 namespace std {
5 template <class _E>
6 class initializer_list
7 {};
10 template<class E> int f(std::initializer_list<E> il);
13 int F = f({1, 2, 3});
14 #ifdef CPP98
15 //expected-error@-2{{expected expression}}
16 #else
17 //expected-error@-4{{cannot compile}}
18 #endif