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