diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-12-06 00:09:40 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-12-06 00:09:40 +0000 |
commit | 3ec39215f9f66fb8ba48367ab9855a0b68894be5 (patch) | |
tree | a77a4bbc7a7b815f2d64b4401e3c34de0b201aff /clang/test/Index/comment-cplus-template-decls.cpp | |
parent | 0f12837be0a736623c51c8a6499cda66ccc64c26 (diff) | |
download | bcm5719-llvm-3ec39215f9f66fb8ba48367ab9855a0b68894be5.tar.gz bcm5719-llvm-3ec39215f9f66fb8ba48367ab9855a0b68894be5.zip |
More C++ testing of declarations embedded in
<declaration> tag of Comment XML and fixing
DeclPrint of templates along the way - wip.
//rdar://12378714
llvm-svn: 169453
Diffstat (limited to 'clang/test/Index/comment-cplus-template-decls.cpp')
-rw-r--r-- | clang/test/Index/comment-cplus-template-decls.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/clang/test/Index/comment-cplus-template-decls.cpp b/clang/test/Index/comment-cplus-template-decls.cpp new file mode 100644 index 00000000000..c942d18211e --- /dev/null +++ b/clang/test/Index/comment-cplus-template-decls.cpp @@ -0,0 +1,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 <typename T> struct A {\n}</Declaration> +// CHECL: <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> {\n}</Declaration> +// CHECK: <Declaration>using A<T>::f</Declaration> |