2012-09-18 08:52:05 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2012-09-18 08:52:05 +08:00
|
|
|
|
|
|
|
struct S {
|
|
|
|
S(int, int) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
void f(int, S const&, int) {}
|
|
|
|
|
|
|
|
void test1()
|
|
|
|
{
|
|
|
|
S X1{1, 1,};
|
|
|
|
S X2 = {1, 1,};
|
|
|
|
|
|
|
|
f(0, {1, 1}, 0);
|
|
|
|
}
|
2013-01-15 14:49:38 +08:00
|
|
|
|
|
|
|
namespace PR14948 {
|
|
|
|
template<typename T> struct Q { static T x; };
|
|
|
|
|
|
|
|
struct X {};
|
|
|
|
template<> X Q<X>::x {};
|
|
|
|
template<> int Q<int[]>::x[] { 1, 2, 3 };
|
|
|
|
template<> int Q<int>::x { 1 };
|
|
|
|
|
|
|
|
template<typename T> T Q<T>::x {};
|
|
|
|
}
|