Comment to XML conversion: no, we don't want to print instantiations for the

<Declaration> tag

llvm-svn: 171763
This commit is contained in:
Dmitri Gribenko 2013-01-07 18:45:48 +00:00
parent 3b2db0bcd3
commit a9cc2491dd
3 changed files with 4 additions and 4 deletions

View File

@ -162,7 +162,7 @@ private:
*/ */
template <class T> friend class valarray; template <class T> friend class valarray;
}; };
// CHECK: <Declaration>template &lt;class T = unsigned int&gt; class valarray {\n} template &lt;class T&gt; class valarray</Declaration> // CHECK: <Declaration>template &lt;class T&gt; class valarray</Declaration>
// CHECK: <Declaration>friend template &lt;class T&gt; class valarray</Declaration> // CHECK: <Declaration>friend template &lt;class T&gt; class valarray</Declaration>
class gslice class gslice

View File

@ -658,7 +658,7 @@ class comment_to_xml_conversion_01 {
template<typename T, typename U> template<typename T, typename U>
void comment_to_xml_conversion_10(T aaa, U bbb); 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@&gt;2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#</USR><Declaration>template &lt;typename T = int, typename U = int&gt;\nvoid comment_to_xml_conversion_10(int aaa, int bbb) template &lt;typename T,\n typename U&gt;\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@&gt;2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#</USR><Declaration>template &lt;typename T, typename U&gt;\nvoid comment_to_xml_conversion_10(T aaa, U bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
/// Aaa. /// Aaa.
template<> template<>
@ -670,7 +670,7 @@ void comment_to_xml_conversion_10(int aaa, int bbb);
template<typename T, typename U> template<typename T, typename U>
class comment_to_xml_conversion_11 { }; 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&gt;2#T#T@comment_to_xml_conversion_11</USR><Declaration>template &lt;typename T = int, typename U = int&gt;\nclass comment_to_xml_conversion_11 {\n} template &lt;typename T, typename U&gt; 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&gt;2#T#T@comment_to_xml_conversion_11</USR><Declaration>template &lt;typename T, typename U&gt; class comment_to_xml_conversion_11 {\n}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
/// Aaa. /// Aaa.
template<typename T> template<typename T>

View File

@ -911,7 +911,7 @@ void getSourceTextOfDeclaration(const DeclInfo *ThisDecl,
PPolicy.PolishForDeclaration = true; PPolicy.PolishForDeclaration = true;
PPolicy.TerseOutput = true; PPolicy.TerseOutput = true;
ThisDecl->CurrentDecl->print(OS, PPolicy, ThisDecl->CurrentDecl->print(OS, PPolicy,
/*Indentation*/0, /*PrintInstantiation*/true); /*Indentation*/0, /*PrintInstantiation*/false);
} }
void CommentASTToXMLConverter::formatTextOfDeclaration( void CommentASTToXMLConverter::formatTextOfDeclaration(