blob: c942d18211ebae31dde0728491cae974ca27bbe5 [file] [log] [blame]
Fariborz Jahanian3ec39212012-12-06 00:09:40 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 std=c++11 %s > %t/out
4// RUN: FileCheck %s < %t/out
5
6// Ensure that XML we generate is not invalid.
7// RUN: FileCheck %s -check-prefix=WRONG < %t/out
8// WRONG-NOT: CommentXMLInvalid
9// rdar://12378714
10
11/**
12 * \brief Aaa
13*/
14template<typename T> struct A {
15/**
16 * \brief Bbb
17*/
18 A();
19/**
20 * \brief Ccc
21*/
22 ~A();
23/**
24 * \brief Ddd
25*/
26 void f() { }
27};
28// CHECK: <Declaration>template &lt;typename T&gt; struct A {\n}</Declaration>
29// CHECL: <Declaration>A&lt;T&gt;()</Declaration>
30// CHECK: <Declaration>void ~A&lt;T&gt;()</Declaration>
31
32/**
33 * \Brief Eee
34*/
35template <typename T> struct D : A<T> {
36/**
37 * \brief
38*/
39 using A<T>::f;
40
41 void f();
42};
43// CHECK: <Declaration>template &lt;typename T&gt; struct D : A&lt;T&gt; {\n}</Declaration>
44// CHECK: <Declaration>using A&lt;T&gt;::f</Declaration>