From a9cc2491dde81261044a4ac21798fcfeb6c83d8a Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Mon, 7 Jan 2013 18:45:48 +0000 Subject: [PATCH] Comment to XML conversion: no, we don't want to print instantiations for the tag llvm-svn: 171763 --- clang/test/Index/comment-cplus-decls.cpp | 2 +- clang/test/Index/comment-to-html-xml-conversion.cpp | 4 ++-- clang/tools/libclang/CXComment.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/test/Index/comment-cplus-decls.cpp b/clang/test/Index/comment-cplus-decls.cpp index ed851d84fc84..2fa688c3d794 100644 --- a/clang/test/Index/comment-cplus-decls.cpp +++ b/clang/test/Index/comment-cplus-decls.cpp @@ -162,7 +162,7 @@ private: */ template friend class valarray; }; -// CHECK: template <class T = unsigned int> class valarray {\n} template <class T> class valarray +// CHECK: template <class T> class valarray // CHECK: friend template <class T> class valarray class gslice diff --git a/clang/test/Index/comment-to-html-xml-conversion.cpp b/clang/test/Index/comment-to-html-xml-conversion.cpp index 139120ec0519..45f8df36184b 100644 --- a/clang/test/Index/comment-to-html-xml-conversion.cpp +++ b/clang/test/Index/comment-to-html-xml-conversion.cpp @@ -658,7 +658,7 @@ class comment_to_xml_conversion_01 { template void comment_to_xml_conversion_10(T aaa, U bbb); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_10c:@FT@>2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#template <typename T = int, typename U = int>\nvoid comment_to_xml_conversion_10(int aaa, int bbb) template <typename T,\n typename U>\nvoid comment_to_xml_conversion_10(T aaa, U bbb) Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_10c:@FT@>2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#template <typename T, typename U>\nvoid comment_to_xml_conversion_10(T aaa, U bbb) Aaa.] /// Aaa. template<> @@ -670,7 +670,7 @@ void comment_to_xml_conversion_10(int aaa, int bbb); template class comment_to_xml_conversion_11 { }; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@CT>2#T#T@comment_to_xml_conversion_11template <typename T = int, typename U = int>\nclass comment_to_xml_conversion_11 {\n} template <typename T, typename U> class comment_to_xml_conversion_11 {\n} Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@CT>2#T#T@comment_to_xml_conversion_11template <typename T, typename U> class comment_to_xml_conversion_11 {\n} Aaa.] /// Aaa. template diff --git a/clang/tools/libclang/CXComment.cpp b/clang/tools/libclang/CXComment.cpp index d831885e276b..d72403d87fc6 100644 --- a/clang/tools/libclang/CXComment.cpp +++ b/clang/tools/libclang/CXComment.cpp @@ -911,7 +911,7 @@ void getSourceTextOfDeclaration(const DeclInfo *ThisDecl, PPolicy.PolishForDeclaration = true; PPolicy.TerseOutput = true; ThisDecl->CurrentDecl->print(OS, PPolicy, - /*Indentation*/0, /*PrintInstantiation*/true); + /*Indentation*/0, /*PrintInstantiation*/false); } void CommentASTToXMLConverter::formatTextOfDeclaration(