f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
69 lines
1.5 KiB
C++
69 lines
1.5 KiB
C++
// 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 <typename T> struct A {}</Declaration>
|
|
// CHECK: <Declaration>A<T>()</Declaration>
|
|
// CHECK: <Declaration>void ~A<T>()</Declaration>
|
|
|
|
/**
|
|
* \Brief Eee
|
|
*/
|
|
template <typename T> struct D : A<T> {
|
|
/**
|
|
* \brief
|
|
*/
|
|
using A<T>::f;
|
|
|
|
void f();
|
|
};
|
|
// CHECK: <Declaration>template <typename T> struct D : A<T> {}</Declaration>
|
|
// CHECK: <Declaration>using A<T>::f</Declaration>
|
|
|
|
struct Base {
|
|
int foo;
|
|
};
|
|
/**
|
|
* \brief
|
|
*/
|
|
template<typename T> struct E : Base {
|
|
/**
|
|
* \brief
|
|
*/
|
|
using Base::foo;
|
|
};
|
|
// CHECK: <Declaration>template <typename T> struct E : Base {}</Declaration>
|
|
// CHECK: <Declaration>using Base::foo</Declaration>
|
|
|
|
/// \tparam
|
|
/// \param AAA Blah blah
|
|
template<typename T>
|
|
void func_template_1(T AAA);
|
|
// CHECK: <Declaration>template <typename T> void func_template_1(T AAA)</Declaration>
|
|
|
|
template<template<template<typename CCC> class DDD, class BBB> class AAA>
|
|
void func_template_2();
|
|
// FIXME: There is not Declaration field in the generated output.
|