[cfe-commits] r161142 - in /cfe/trunk/test/Sema: warn-documentation-fixits.c warn-documentation-fixits.cpp

Dmitri Gribenko gribozavr at gmail.com
Wed Aug 1 16:27:13 PDT 2012


Author: gribozavr
Date: Wed Aug  1 18:27:13 2012
New Revision: 161142

URL: http://llvm.org/viewvc/llvm-project?rev=161142&view=rev
Log:
Comment diagnostics: add tests for \tparam fixits.

Added:
    cfe/trunk/test/Sema/warn-documentation-fixits.cpp
      - copied, changed from r161137, cfe/trunk/test/Sema/warn-documentation-fixits.c
Removed:
    cfe/trunk/test/Sema/warn-documentation-fixits.c

Removed: cfe/trunk/test/Sema/warn-documentation-fixits.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation-fixits.c?rev=161141&view=auto
==============================================================================
--- cfe/trunk/test/Sema/warn-documentation-fixits.c (original)
+++ cfe/trunk/test/Sema/warn-documentation-fixits.c (removed)
@@ -1,12 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
-
-/// \param ZZZZZZZZZZ Blah blah. expected-warning {{parameter 'ZZZZZZZZZZ' not found in the function declaration}}  expected-note {{did you mean 'a'?}}
-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);
-
-// CHECK: fix-it:"{{.*}}":{4:12-4:22}:"a"
-// CHECK: fix-it:"{{.*}}":{7:12-7:15}:"aaa"
-

Copied: cfe/trunk/test/Sema/warn-documentation-fixits.cpp (from r161137, cfe/trunk/test/Sema/warn-documentation-fixits.c)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation-fixits.cpp?p2=cfe/trunk/test/Sema/warn-documentation-fixits.cpp&p1=cfe/trunk/test/Sema/warn-documentation-fixits.c&r1=161137&r2=161142&rev=161142&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-documentation-fixits.c (original)
+++ cfe/trunk/test/Sema/warn-documentation-fixits.cpp Wed Aug  1 18:27:13 2012
@@ -7,6 +7,19 @@
 /// \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 at +1 {{template parameter 'ZZZZZZZZZZ' not found in the template declaration}} expected-note at +1 {{did you mean 'T'?}}
+/// \tparam ZZZZZZZZZZ Aaa
+template<typename T>
+void test3(T aaa);
+
+// expected-warning at +1 {{template parameter 'SomTy' not found in the template declaration}} expected-note at +1 {{did you mean 'SomeTy'?}}
+/// \tparam SomTy Aaa
+/// \tparam OtherTy Bbb
+template<typename SomeTy, typename OtherTy>
+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"
 





More information about the cfe-commits mailing list