aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-01.xml7
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-02.xml9
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-03.xml11
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-04.xml11
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-05.xml10
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-06.xml5
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-07.xml13
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-08.xml13
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-09.xml13
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-10.xml11
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-11.xml13
-rw-r--r--test/Index/Inputs/CommentXML/invalid-function-12.xml6
-rw-r--r--test/Index/Inputs/CommentXML/valid-class-01.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-class-02.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-class-03.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-class-04.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-01.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-02.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-03.xml12
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-04.xml13
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-05.xml8
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-06.xml6
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-07.xml29
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-08.xml17
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-09.xml6
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-10.xml6
-rw-r--r--test/Index/Inputs/CommentXML/valid-namespace-01.xml6
-rw-r--r--test/Index/Inputs/CommentXML/valid-other-01.xml5
-rw-r--r--test/Index/Inputs/CommentXML/valid-typedef-01.xml6
-rw-r--r--test/Index/Inputs/CommentXML/valid-typedef-02.xml25
-rw-r--r--test/Index/Inputs/CommentXML/valid-variable-01.xml6
-rw-r--r--test/Index/annotate-comments.cpp162
-rw-r--r--test/Index/comment-xml-schema.c42
-rw-r--r--test/Sema/warn-documentation.cpp4
-rw-r--r--test/lit.cfg4
35 files changed, 475 insertions, 34 deletions
diff --git a/test/Index/Inputs/CommentXML/invalid-function-01.xml b/test/Index/Inputs/CommentXML/invalid-function-01.xml
new file mode 100644
index 0000000000..85f06695a0
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-02.xml b/test/Index/Inputs/CommentXML/invalid-function-02.xml
new file mode 100644
index 0000000000..700711b0a0
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-02.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-03.xml b/test/Index/Inputs/CommentXML/invalid-function-03.xml
new file mode 100644
index 0000000000..0c4618f1ef
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Term></Term>
+ <Definition><Para>Bbb.</Para></Definition>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-04.xml b/test/Index/Inputs/CommentXML/invalid-function-04.xml
new file mode 100644
index 0000000000..88dd5a851c
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-04.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Term> </Term>
+ <Definition><Para>Bbb.</Para></Definition>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-05.xml b/test/Index/Inputs/CommentXML/invalid-function-05.xml
new file mode 100644
index 0000000000..ce96b7d05f
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-05.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Term>x1</Term>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-06.xml b/test/Index/Inputs/CommentXML/invalid-function-06.xml
new file mode 100644
index 0000000000..5419c677aa
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-06.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa <monospaced></monospaced>.</Para></Abstract>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-07.xml b/test/Index/Inputs/CommentXML/invalid-function-07.xml
new file mode 100644
index 0000000000..ce7eccec1e
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-07.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>-1</Index>
+ <Direction isExplicit="0">in</Direction>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-08.xml b/test/Index/Inputs/CommentXML/invalid-function-08.xml
new file mode 100644
index 0000000000..66e69e8172
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-08.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>0</Index>
+ <Direction isExplicit="aaa">in</Direction>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-09.xml b/test/Index/Inputs/CommentXML/invalid-function-09.xml
new file mode 100644
index 0000000000..39617b6a87
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-09.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>0</Index>
+ <Direction isExplicit="0">aaa</Direction>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/invalid-function-10.xml b/test/Index/Inputs/CommentXML/invalid-function-10.xml
new file mode 100644
index 0000000000..ccce4bbe56
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-10.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<TemplateParameters>
+ <Parameter>
+ <Name>x1</Name>
+ </Parameter>
+</TemplateParameters>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/invalid-function-11.xml b/test/Index/Inputs/CommentXML/invalid-function-11.xml
new file mode 100644
index 0000000000..167911e9e7
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-11.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<TemplateParameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>aaa</Index>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</TemplateParameters>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/invalid-function-12.xml b/test/Index/Inputs/CommentXML/invalid-function-12.xml
new file mode 100644
index 0000000000..f5b5e03e33
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/invalid-function-12.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function templateKind="aaa">
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/valid-class-01.xml b/test/Index/Inputs/CommentXML/valid-class-01.xml
new file mode 100644
index 0000000000..bd893e62d5
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-class-01.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Class>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-class-02.xml b/test/Index/Inputs/CommentXML/valid-class-02.xml
new file mode 100644
index 0000000000..2e20a921f7
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-class-02.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Class templateKind="template">
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-class-03.xml b/test/Index/Inputs/CommentXML/valid-class-03.xml
new file mode 100644
index 0000000000..2ce1a2c98d
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-class-03.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Class templateKind="specialization">
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-class-04.xml b/test/Index/Inputs/CommentXML/valid-class-04.xml
new file mode 100644
index 0000000000..da1522d85a
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-class-04.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Class templateKind="partialSpecialization">
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Class>
diff --git a/test/Index/Inputs/CommentXML/valid-function-01.xml b/test/Index/Inputs/CommentXML/valid-function-01.xml
new file mode 100644
index 0000000000..02060e7fb7
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-01.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-02.xml b/test/Index/Inputs/CommentXML/valid-function-02.xml
new file mode 100644
index 0000000000..989d6a7c14
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-02.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa <bold>bbb</bold> <monospaced>ccc</monospaced> <emphasized>ddd</emphasized>.</Para></Abstract>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-03.xml b/test/Index/Inputs/CommentXML/valid-function-03.xml
new file mode 100644
index 0000000000..891211d81c
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-03.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Direction isExplicit="0">in</Direction>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-04.xml b/test/Index/Inputs/CommentXML/valid-function-04.xml
new file mode 100644
index 0000000000..b65b3e92ff
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-04.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>0</Index>
+ <Direction isExplicit="0">in</Direction>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</Parameters>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-05.xml b/test/Index/Inputs/CommentXML/valid-function-05.xml
new file mode 100644
index 0000000000..2dddbd7be2
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-05.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Discussion>
+ <Para>Ccc</Para>
+</Discussion>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-06.xml b/test/Index/Inputs/CommentXML/valid-function-06.xml
new file mode 100644
index 0000000000..1df3aa42b8
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-06.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<ResultDiscussion><Para>Ccc.</Para></ResultDiscussion>
+</Function>
diff --git a/test/Index/Inputs/CommentXML/valid-function-07.xml b/test/Index/Inputs/CommentXML/valid-function-07.xml
new file mode 100644
index 0000000000..1521e2aa16
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-07.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<Parameters>
+ <Parameter>
+ <Name>x2</Name>
+ <Index>0</Index>
+ <Direction isExplicit="0">in</Direction>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+ <Parameter>
+ <Name>x3</Name>
+ <Index>2</Index>
+ <Direction isExplicit="1">out</Direction>
+ <Discussion><Para>Ccc</Para></Discussion>
+ </Parameter>
+ <Parameter>
+ <Name>x1</Name>
+ <Direction isExplicit="1">in,out</Direction>
+ <Discussion><Para>Ddd</Para></Discussion>
+ </Parameter>
+</Parameters>
+<ResultDiscussion><Para>Eee.</Para></ResultDiscussion>
+<Discussion>
+ <Para>Fff</Para>
+</Discussion>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/valid-function-08.xml b/test/Index/Inputs/CommentXML/valid-function-08.xml
new file mode 100644
index 0000000000..481a6c0658
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-08.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<TemplateParameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>0</Index>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+ <Parameter>
+ <Name>x2</Name>
+ <Discussion><Para>Ccc</Para></Discussion>
+ </Parameter>
+</TemplateParameters>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/valid-function-09.xml b/test/Index/Inputs/CommentXML/valid-function-09.xml
new file mode 100644
index 0000000000..cf4cc8fbd7
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-09.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function templateKind="template">
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/valid-function-10.xml b/test/Index/Inputs/CommentXML/valid-function-10.xml
new file mode 100644
index 0000000000..4fadf30e6f
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-function-10.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Function templateKind="specialization">
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Function>
+
diff --git a/test/Index/Inputs/CommentXML/valid-namespace-01.xml b/test/Index/Inputs/CommentXML/valid-namespace-01.xml
new file mode 100644
index 0000000000..a73aad5548
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-namespace-01.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Namespace>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Namespace>
+
diff --git a/test/Index/Inputs/CommentXML/valid-other-01.xml b/test/Index/Inputs/CommentXML/valid-other-01.xml
new file mode 100644
index 0000000000..46b8a4676f
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-other-01.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Other>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Other>
diff --git a/test/Index/Inputs/CommentXML/valid-typedef-01.xml b/test/Index/Inputs/CommentXML/valid-typedef-01.xml
new file mode 100644
index 0000000000..1b7da8d83b
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-typedef-01.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Typedef>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Typedef>
+
diff --git a/test/Index/Inputs/CommentXML/valid-typedef-02.xml b/test/Index/Inputs/CommentXML/valid-typedef-02.xml
new file mode 100644
index 0000000000..2a3218906b
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-typedef-02.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Typedef>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+<TemplateParameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>0</Index>
+ <Discussion><Para>Bbb</Para></Discussion>
+ </Parameter>
+</TemplateParameters>
+<Parameters>
+ <Parameter>
+ <Name>x1</Name>
+ <Index>0</Index>
+ <Direction isExplicit="0">in</Direction>
+ <Discussion><Para>Ccc</Para></Discussion>
+ </Parameter>
+</Parameters>
+<ResultDiscussion><Para>Ddd.</Para></ResultDiscussion>
+<Discussion>
+ <Para>Eee.</Para>
+</Discussion>
+</Typedef>
+
diff --git a/test/Index/Inputs/CommentXML/valid-variable-01.xml b/test/Index/Inputs/CommentXML/valid-variable-01.xml
new file mode 100644
index 0000000000..e17da91da3
--- /dev/null
+++ b/test/Index/Inputs/CommentXML/valid-variable-01.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Variable>
+<Name>aaa</Name>
+<Abstract><Para>Aaa.</Para></Abstract>
+</Variable>
+
diff --git a/test/Index/annotate-comments.cpp b/test/Index/annotate-comments.cpp
index a13613954e..03aae9bee4 100644
--- a/test/Index/annotate-comments.cpp
+++ b/test/Index/annotate-comments.cpp
@@ -358,14 +358,84 @@ void comment_to_html_conversion_30();
/// <em>0&lt;i</em>
void comment_to_html_conversion_31();
+/// Aaa.
+class comment_to_xml_conversion_01 {
+ /// \param aaa Blah blah.
+ comment_to_xml_conversion_01(int aaa);
+
+ /// Aaa.
+ ~comment_to_xml_conversion_01();
+
+ /// \param aaa Blah blah.
+ int comment_to_xml_conversion_02(int aaa);
+
+ /// \param aaa Blah blah.
+ static int comment_to_xml_conversion_03(int aaa);
+
+ /// Aaa.
+ int comment_to_xml_conversion_04;
+
+ /// Aaa.
+ static int comment_to_xml_conversion_05;
+
+ /// \param aaa Blah blah.
+ void operator()(int aaa);
+
+ /// Aaa.
+ operator bool();
+
+ /// Aaa.
+ typedef int comment_to_xml_conversion_06;
+
+ /// Aaa.
+ using comment_to_xml_conversion_07 = int;
+
+ template<typename T, typename U>
+ class comment_to_xml_conversion_08 { };
+
+ /// Aaa.
+ template<typename T>
+ using comment_to_xml_conversion_09 = comment_to_xml_conversion_08<T, int>;
+};
+
+/// Aaa.
+template<typename T, typename U>
+void comment_to_xml_conversion_10(T aaa, U bbb);
+
+/// Aaa.
+template<>
+void comment_to_xml_conversion_10(int aaa, int bbb);
+
+/// Aaa.
+template<typename T, typename U>
+class comment_to_xml_conversion_11 { };
+
+/// Aaa.
+template<typename T>
+class comment_to_xml_conversion_11<T, int> { };
+
+/// Aaa.
+template<>
+class comment_to_xml_conversion_11<int, int> { };
+
+/// Aaa.
+int comment_to_xml_conversion_12;
+
+/// Aaa.
+namespace comment_to_xml_conversion_13 {
+ /// Aaa.
+ namespace comment_to_xml_conversion_14 {
+ }
+}
+
#endif
// RUN: rm -rf %t
// RUN: mkdir %t
-// RUN: %clang_cc1 -x c++ -emit-pch -o %t/out.pch %s
-// RUN: %clang_cc1 -x c++ -include-pch %t/out.pch -fsyntax-only %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
-// RUN: c-index-test -test-load-source all %s > %t/out.c-index-direct
+// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 > %t/out.c-index-direct
// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
@@ -384,6 +454,9 @@ void comment_to_html_conversion_31();
// Ensure we don't pick up extra comments.
// WRONG-NOT: IS_DOXYGEN_START{{.*}}IS_DOXYGEN_START{{.*}}BriefComment=
// WRONG-NOT: IS_DOXYGEN_END{{.*}}IS_DOXYGEN_END{{.*}}BriefComment=
+//
+// Ensure that XML is not invalid
+// WRONG-NOT: CommentXMLInvalid
// RUN: FileCheck %s < %t/out.c-index-direct
// RUN: FileCheck %s < %t/out.c-index-pch
@@ -427,12 +500,12 @@ void comment_to_html_conversion_31();
// CHECK: annotate-comments.cpp:218:6: FunctionDecl=isdoxy49:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa]
// CHECK: annotate-comments.cpp:222:6: FunctionDecl=isdoxy50:{{.*}} BriefComment=[Returns ddd IS_DOXYGEN_END]
-// CHECK: annotate-comments.cpp:225:6: FunctionDecl=comment_to_html_conversion_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>]
+// CHECK: annotate-comments.cpp:225:6: FunctionDecl=comment_to_html_conversion_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments.cpp" line="225" column="6"><Name>comment_to_html_conversion_1</Name><USR>c:@F@comment_to_html_conversion_1#</USR><Abstract><Para> Aaa.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))]
-// CHECK: annotate-comments.cpp:228:6: FunctionDecl=comment_to_html_conversion_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>]
+// CHECK: annotate-comments.cpp:228:6: FunctionDecl=comment_to_html_conversion_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments.cpp" line="228" column="6"><Name>comment_to_html_conversion_2</Name><USR>c:@F@comment_to_html_conversion_2#</USR><Abstract><Para> Aaa.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -440,7 +513,7 @@ void comment_to_html_conversion_31();
// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
-// CHECK: annotate-comments.cpp:231:6: FunctionDecl=comment_to_html_conversion_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>]
+// CHECK: annotate-comments.cpp:231:6: FunctionDecl=comment_to_html_conversion_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments.cpp" line="231" column="6"><Name>comment_to_html_conversion_3</Name><USR>c:@F@comment_to_html_conversion_3#</USR><Abstract><Para> Aaa.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -448,7 +521,7 @@ void comment_to_html_conversion_31();
// CHECK-NEXT: (CXComment_BlockCommand CommandName=[short]
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
-// CHECK: annotate-comments.cpp:236:6: FunctionDecl=comment_to_html_conversion_4:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>]
+// CHECK: annotate-comments.cpp:236:6: FunctionDecl=comment_to_html_conversion_4:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments.cpp" line="236" column="6"><Name>comment_to_html_conversion_4</Name><USR>c:@F@comment_to_html_conversion_4#</USR><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -458,7 +531,7 @@ void comment_to_html_conversion_31();
// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
-// CHECK: annotate-comments.cpp:243:6: FunctionDecl=comment_to_html_conversion_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>]
+// CHECK: annotate-comments.cpp:243:6: FunctionDecl=comment_to_html_conversion_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments.cpp" line="243" column="6"><Name>comment_to_html_conversion_5</Name><USR>c:@F@comment_to_html_conversion_5#</USR><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para><Para> Ccc.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -470,7 +543,7 @@ void comment_to_html_conversion_31();
// CHECK-NEXT: (CXComment_Text Text=[ Bbb.])))
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Ccc.])))]
-// CHECK: annotate-comments.cpp:247:6: FunctionDecl=comment_to_html_conversion_6:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>]
+// CHECK: annotate-comments.cpp:247:6: FunctionDecl=comment_to_html_conversion_6:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments.cpp" line="247" column="6"><Name>comment_to_html_conversion_6</Name><USR>c:@F@comment_to_html_conversion_6#</USR><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -482,7 +555,7 @@ voi