summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/comment-cplus-template-decls.cpp
blob: c942d18211ebae31dde0728491cae974ca27bbe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// RUN: rm -rf %t
// RUN: mkdir %t
// 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
// RUN: FileCheck %s < %t/out

// Ensure that XML we generate is not invalid.
// RUN: FileCheck %s -check-prefix=WRONG < %t/out
// WRONG-NOT: CommentXMLInvalid
// rdar://12378714

/**
 * \brief Aaa
*/
template<typename T> struct A {
/**
 * \brief Bbb
*/
  A();
/**
 * \brief Ccc
*/
  ~A();
/**
 * \brief Ddd
*/
  void f() { }
};
// CHECK: <Declaration>template &lt;typename T&gt; struct A {\n}</Declaration>
// CHECL: <Declaration>A&lt;T&gt;()</Declaration>
// CHECK: <Declaration>void ~A&lt;T&gt;()</Declaration>

/**
 * \Brief Eee
*/
template <typename T> struct D : A<T> {
/**
 * \brief
*/
  using A<T>::f;
  
  void f();
};
// CHECK: <Declaration>template &lt;typename T&gt; struct D :  A&lt;T&gt; {\n}</Declaration>
// CHECK: <Declaration>using A&lt;T&gt;::f</Declaration>
OpenPOWER on IntegriCloud