From: Dmitri Gribenko Date: Wed, 1 Aug 2012 23:27:13 +0000 (+0000) Subject: Comment diagnostics: add tests for \tparam fixits. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7a1199081a59213492fdba794b796bcba500664;p=clang Comment diagnostics: add tests for \tparam fixits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161142 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/warn-documentation-fixits.c b/test/Sema/warn-documentation-fixits.cpp similarity index 51% rename from test/Sema/warn-documentation-fixits.c rename to test/Sema/warn-documentation-fixits.cpp index 273867de3a..f67ae46ad1 100644 --- a/test/Sema/warn-documentation-fixits.c +++ b/test/Sema/warn-documentation-fixits.cpp @@ -7,6 +7,19 @@ int test1(int a); /// \param aab Blah blah. expected-warning {{parameter 'aab' not found in the function declaration}} expected-note {{did you mean 'aaa'?}} int test2(int aaa, int bbb); +// expected-warning@+1 {{template parameter 'ZZZZZZZZZZ' not found in the template declaration}} expected-note@+1 {{did you mean 'T'?}} +/// \tparam ZZZZZZZZZZ Aaa +template +void test3(T aaa); + +// expected-warning@+1 {{template parameter 'SomTy' not found in the template declaration}} expected-note@+1 {{did you mean 'SomeTy'?}} +/// \tparam SomTy Aaa +/// \tparam OtherTy Bbb +template +void test4(SomeTy aaa, OtherTy bbb); + // CHECK: fix-it:"{{.*}}":{4:12-4:22}:"a" // CHECK: fix-it:"{{.*}}":{7:12-7:15}:"aaa" +// CHECK: fix-it:"{{.*}}":{11:13-11:23}:"T" +// CHECK: fix-it:"{{.*}}":{16:13-16:18}:"SomeTy"