summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/cxx0x-return-init-list.cpp
blob: da83271c4d7ec3047de05decbc8c64709f79d5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -fsyntax-only -verify %s

// Test that a very basic variation of generalized initializer returns (that
// required for libstdc++ 4.5) is supported in C++98.

int test0(int i) {
  return { i }; // expected-warning{{generalized initializer lists are a C++11 extension}}
}

template<typename T, typename U>
T test1(U u) {
  return { u }; // expected-warning{{generalized initializer lists are a C++11 extension}}
}

template int test1(char);
template long test1(int);