blob: f67ae46ad129bddbdafe9e1254bb9bf924511ecf [file] [log] [blame]
Dmitri Gribenkob7a11992012-08-01 23:27:13 +00001// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -verify %s
2// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
3
4/// \param ZZZZZZZZZZ Blah blah. expected-warning {{parameter 'ZZZZZZZZZZ' not found in the function declaration}} expected-note {{did you mean 'a'?}}
5int test1(int a);
6
7/// \param aab Blah blah. expected-warning {{parameter 'aab' not found in the function declaration}} expected-note {{did you mean 'aaa'?}}
8int test2(int aaa, int bbb);
9
10// expected-warning@+1 {{template parameter 'ZZZZZZZZZZ' not found in the template declaration}} expected-note@+1 {{did you mean 'T'?}}
11/// \tparam ZZZZZZZZZZ Aaa
12template<typename T>
13void test3(T aaa);
14
15// expected-warning@+1 {{template parameter 'SomTy' not found in the template declaration}} expected-note@+1 {{did you mean 'SomeTy'?}}
16/// \tparam SomTy Aaa
17/// \tparam OtherTy Bbb
18template<typename SomeTy, typename OtherTy>
19void test4(SomeTy aaa, OtherTy bbb);
20
21// CHECK: fix-it:"{{.*}}":{4:12-4:22}:"a"
22// CHECK: fix-it:"{{.*}}":{7:12-7:15}:"aaa"
23// CHECK: fix-it:"{{.*}}":{11:13-11:23}:"T"
24// CHECK: fix-it:"{{.*}}":{16:13-16:18}:"SomeTy"
25