Dmitri Gribenko | b7a1199 | 2012-08-01 23:27:13 +0000 | [diff] [blame^] | 1 | // 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'?}} |
| 5 | int 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'?}} |
| 8 | int 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 |
| 12 | template<typename T> |
| 13 | void 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 |
| 18 | template<typename SomeTy, typename OtherTy> |
| 19 | void 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 | |