blob: 9ceeb205be88ff3f914206a7d02986e38e6e70e2 [file] [log] [blame]
Serge Pavlov06b7a872016-10-04 10:11:43 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2
3namespace redecl_in_templ {
4template<typename T> void redecl_in_templ() {
5 extern void func_1(); // expected-note {{previous declaration is here}}
6 extern int func_1(); // expected-error {{functions that differ only in their return type cannot be overloaded}}
7}
8
9void g();
10constexpr void (*p)() = g;
11
12template<bool> struct X {};
13template<> struct X<true> { typedef int type; };
14
15template<typename T> void f() {
16 extern void g();
17 X<&g == p>::type n;
18}
19}