Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / function-redecl-2.cpp
blob9ceeb205be88ff3f914206a7d02986e38e6e70e2
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 namespace redecl_in_templ {
4 template<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}}
9 void g();
10 constexpr void (*p)() = g;
12 template<bool> struct X {};
13 template<> struct X<true> { typedef int type; };
15 template<typename T> void f() {
16 extern void g();
17 X<&g == p>::type n;