blob: da83271c4d7ec3047de05decbc8c64709f79d5fb [file] [log] [blame]
Douglas Gregor6f4596c2011-03-11 23:10:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
Sebastian Redl33deb352012-02-22 10:50:08 +00003// Test that a very basic variation of generalized initializer returns (that
Sebastian Redl5b38a0f2012-02-22 17:38:04 +00004// required for libstdc++ 4.5) is supported in C++98.
Douglas Gregor6f4596c2011-03-11 23:10:44 +00005
6int test0(int i) {
Sebastian Redl33deb352012-02-22 10:50:08 +00007 return { i }; // expected-warning{{generalized initializer lists are a C++11 extension}}
Douglas Gregor6f4596c2011-03-11 23:10:44 +00008}
9
10template<typename T, typename U>
11T test1(U u) {
Sebastian Redl33deb352012-02-22 10:50:08 +000012 return { u }; // expected-warning{{generalized initializer lists are a C++11 extension}}
Douglas Gregor6f4596c2011-03-11 23:10:44 +000013}
14
15template int test1(char);
16template long test1(int);