[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / fntype-decl.cpp
blobb8ae625710dbbf43b6e13101652bb6f8552f7567
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR2942
4 typedef void fn(int);
5 fn f; // expected-note {{previous declaration is here}}
7 int g(int x, int y);
8 int g(int x, int y = 2);
10 typedef int g_type(int, int);
11 g_type g;
13 int h(int x) { // expected-note {{previous definition is here}}
14 return g(x);
17 float f(int) { } // expected-error{{functions that differ only in their return type cannot be overloaded}}
19 int h(int) { } // expected-error{{redefinition of 'h'}}