Richard Smith | 4b08242 | 2012-09-18 00:52:05 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Richard Smith | 4b08242 | 2012-09-18 00:52:05 +0000 | [diff] [blame] | 3 | |
| 4 | struct S { |
| 5 | S(int, int) {} |
| 6 | }; |
| 7 | |
| 8 | void f(int, S const&, int) {} |
| 9 | |
| 10 | void test1() |
| 11 | { |
| 12 | S X1{1, 1,}; |
| 13 | S X2 = {1, 1,}; |
| 14 | |
| 15 | f(0, {1, 1}, 0); |
| 16 | } |
Richard Smith | d3e723e | 2013-01-15 06:49:38 +0000 | [diff] [blame] | 17 | |
| 18 | namespace PR14948 { |
| 19 | template<typename T> struct Q { static T x; }; |
| 20 | |
| 21 | struct X {}; |
| 22 | template<> X Q<X>::x {}; |
| 23 | template<> int Q<int[]>::x[] { 1, 2, 3 }; |
| 24 | template<> int Q<int>::x { 1 }; |
| 25 | |
| 26 | template<typename T> T Q<T>::x {}; |
| 27 | } |