[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / SemaCXX / function-overload-typo-crash.cpp
blob8c5cec8af3a967673f649774e7bd0073e618b466
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR10283
4 void min(); //expected-note {{'min' declared here}}
5 void min(int);
7 template <typename T> void max(T); //expected-note {{'max' declared here}}
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'}}
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}}
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'?}}