cxx0x-return-init-list.cpp revision b3df1386680b3830d2f4d300d4d7eaba134135fc
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// This test checks for a teeny tiny subset of the functionality in
4// the C++11 generalized initializer lists feature, which happens to
5// be used in libstdc++ 4.5. We accept only this syntax so that Clang
6// can handle the libstdc++ 4.5 headers.
7
8int test0(int i) {
9  return { i }; // expected-warning{{generalized initializer lists are a C++11 extension unsupported in Clang}}
10}
11
12template<typename T, typename U>
13T test1(U u) {
14  return { u }; // expected-warning{{generalized initializer lists are a C++11 extension unsupported in Clang}}
15}
16
17template int test1(char);
18template long test1(int);
19