1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
6 decltype(0, f0()) i = 0;
10 struct A { int a[1]; A() { } };
13 float &f2(int const*);
16 float &fr = f2(AC().a);
21 A(decltype(nullptr) param);
25 template<typename T> struct S {};
26 template<typename T> auto f(T t) -> decltype(S<int>(t)) {
27 using U = decltype(S<int>(t));
33 B(decltype(undeclared)); // expected-error {{undeclared identifier}}
36 C(decltype(undeclared; // expected-error {{undeclared identifier}} \
37 // expected-error {{expected ')'}} expected-note {{to match this '('}}
42 template <typename T> struct S {
43 static decltype(T{}, U{}) &f();
52 void foo(conditional<decltype((1),int>) { // expected-note 2 {{to match this '('}} expected-error {{expected ')'}}
53 } // expected-error {{expected function body after function declarator}} expected-error 2 {{expected '>'}} expected-error {{expected ')'}}