summaryrefslogtreecommitdiffstats
path: root/test/Sema/warn-documentation-fixits.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/Sema/warn-documentation-fixits.cpp
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/Sema/warn-documentation-fixits.cpp')
-rw-r--r--test/Sema/warn-documentation-fixits.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Sema/warn-documentation-fixits.cpp b/test/Sema/warn-documentation-fixits.cpp
new file mode 100644
index 0000000..732b44d
--- /dev/null
+++ b/test/Sema/warn-documentation-fixits.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+
+// expected-warning@+1 {{parameter 'ZZZZZZZZZZ' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}}
+/// \param ZZZZZZZZZZ Blah blah.
+int test1(int a);
+
+// expected-warning@+1 {{parameter 'aab' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
+/// \param aab Blah blah.
+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<typename T>
+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<typename SomeTy, typename OtherTy>
+void test4(SomeTy aaa, OtherTy bbb);
+
+// CHECK: fix-it:"{{.*}}":{5:12-5:22}:"a"
+// CHECK: fix-it:"{{.*}}":{9:12-9:15}:"aaa"
+// CHECK: fix-it:"{{.*}}":{13:13-13:23}:"T"
+// CHECK: fix-it:"{{.*}}":{18:13-18:18}:"SomeTy"
+
OpenPOWER on IntegriCloud