From 7a16a02eec1c536b5598423e810b9dae05819f35 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 21 Dec 2012 21:43:05 +0000 Subject: Fixes couple of friend declaration -ast-print bug found by running -ast-print on all-std-headers.cpp which caused it to go into infinite loop. Now -ast-print prints all declarations found in all-std-headers.cpp. llvm-svn: 170928 --- clang/test/Index/comment-cplus-decls.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'clang/test/Index/comment-cplus-decls.cpp') diff --git a/clang/test/Index/comment-cplus-decls.cpp b/clang/test/Index/comment-cplus-decls.cpp index 3d997a50078..29af712e1ce 100644 --- a/clang/test/Index/comment-cplus-decls.cpp +++ b/clang/test/Index/comment-cplus-decls.cpp @@ -77,7 +77,7 @@ template friend void TemplateFriend(); template friend class TemplateFriendClass; }; -// CHECK: friend class Test {\n} +// CHECK: friend class Test // CHECK: friend void foo() // CHECK: friend int int_func() // CHECK: friend bool operator==(const Test &, const Test &) @@ -144,3 +144,28 @@ namespace test3 { } // CHECK: void f(const T &t = T()) // CHECK: friend void f(const test3::A &) + +class MyClass +{ +/** + * \brief plain friend test. +*/ + friend class MyClass; +}; +// CHECK: friend class MyClass + +template class valarray +{ +private: +/** + * \brief template friend test. +*/ + template friend class valarray; +}; +// CHECK: template <class T = unsigned int> class valarray {\n}\ntemplate <class T> class valarray +// CHECK: friend template <class T> class valarray + +class gslice +{ + valarray __size_; +}; -- cgit v1.2.3