1 // RUN: %clang_cc1 -verify -std=c++1y %s
3 // Example from the standard.
6 q(); // expected-error {{undeclared}}
10 q(); // expected-error {{undeclared}}
21 extern int a
; // expected-note {{previous}}
22 int g(void); // expected-note {{previous}}
24 double a
; // expected-error {{different type: 'double' vs 'int'}}
25 double g(); // expected-error {{differ only in their return type}}
30 extern int a
; // expected-note {{previous}}
31 int g(void); // expected-note {{previous}}
34 extern double a
; // expected-error {{different type: 'double' vs 'int'}}
35 double g(void); // expected-error {{differ only in their return type}}
40 constexpr void (*f())() {
44 constexpr void (*g())() {
48 static_assert(f() == g(), "");
53 constexpr void (*f())() {
57 static_assert(f
<int>() == f
<char>(), "");
59 static_assert(f
<int>() == &h
, "");
63 constexpr auto f() -> void (*)() {
67 static constexpr auto h() -> void (*)() { return g
; }
72 static_assert(f() == g
, "");