1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 // PR10283
4 void min(); //expected-note {{'min' declared here}}
5 void min(int);
6 
7 template <typename T> void max(T); //expected-note {{'max' declared here}}
8 
f()9 void f() {
10   fin(); //expected-error {{use of undeclared identifier 'fin'; did you mean 'min'}}
11   fax(0); //expected-error {{use of undeclared identifier 'fax'; did you mean 'max'}}
12 }
13 
14 template <typename T> void somefunc(T*, T*); //expected-note {{'somefunc' declared here}}
15 template <typename T> void somefunc(const T[]); //expected-note {{'somefunc' declared here}}
16 template <typename T1, typename T2> void somefunc(T1*, T2*); //expected-note {{'somefunc' declared here}}
17 template <typename T1, typename T2> void somefunc(T1*, const T2[]); //expected-note 2 {{'somefunc' declared here}}
18 
c()19 void c() {
20   int *i = 0, *j = 0;
21   const int x[] = {1, 2, 3};
22   long *l = 0;
23   somefun(i, j); //expected-error {{use of undeclared identifier 'somefun'; did you mean 'somefunc'?}}
24   somefun(x); //expected-error {{use of undeclared identifier 'somefun'; did you mean 'somefunc'?}}
25   somefun(i, l); //expected-error {{use of undeclared identifier 'somefun'; did you mean 'somefunc'?}}
26   somefun(l, x); //expected-error {{use of undeclared identifier 'somefun'; did you mean 'somefunc'?}}
27   somefun(i, x); //expected-error {{use of undeclared identifier 'somefun'; did you mean 'somefunc'?}}
28 }
29