diff --git a/test/Index/comment-cplus-decls.cpp b/test/Index/comment-cplus-decls.cpp index ed851d84fc84b6341d8bb096b869f71f6ddbfd13..2fa688c3d794136a287903d032934fb4481ecf80 100644 --- a/test/Index/comment-cplus-decls.cpp +++ b/test/Index/comment-cplus-decls.cpp @@ -162,7 +162,7 @@ private: */ template <class T> friend class valarray; }; -// CHECK: <Declaration>template <class T = unsigned int> class valarray {\n} template <class T> class valarray</Declaration> +// CHECK: <Declaration>template <class T> class valarray</Declaration> // CHECK: <Declaration>friend template <class T> class valarray</Declaration> class gslice diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp index 139120ec05194f65f90210ae8a73e598399911a6..45f8df36184b706bfb4f0a8633e7bfcf851caf57 100644 --- a/test/Index/comment-to-html-xml-conversion.cpp +++ b/test/Index/comment-to-html-xml-conversion.cpp @@ -658,7 +658,7 @@ class comment_to_xml_conversion_01 { template<typename T, typename U> 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=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@FT@>2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#</USR><Declaration>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)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@FT@>2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#</USR><Declaration>template <typename T, typename U>\nvoid comment_to_xml_conversion_10(T aaa, U bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>] /// Aaa. template<> @@ -670,7 +670,7 @@ void comment_to_xml_conversion_10(int aaa, int bbb); template<typename T, typename U> class comment_to_xml_conversion_11 { }; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@CT>2#T#T@comment_to_xml_conversion_11</USR><Declaration>template <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}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@CT>2#T#T@comment_to_xml_conversion_11</USR><Declaration>template <typename T, typename U> class comment_to_xml_conversion_11 {\n}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>] /// Aaa. template<typename T> diff --git a/tools/libclang/CXComment.cpp b/tools/libclang/CXComment.cpp index d831885e276becea24e67027362983b9fe86ee91..d72403d87fc6d20c8601d1313fd4236619291da8 100644 --- a/tools/libclang/CXComment.cpp +++ b/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(