Author: gribozavr
Date: Mon Jan  7 12:45:48 2013
New Revision: 171763

URL: http://llvm.org/viewvc/llvm-project?rev=171763&view=rev
Log:
Comment to XML conversion: no, we don't want to print instantiations for the
<Declaration> tag

Modified:
    cfe/trunk/test/Index/comment-cplus-decls.cpp
    cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp
    cfe/trunk/tools/libclang/CXComment.cpp

Modified: cfe/trunk/test/Index/comment-cplus-decls.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/comment-cplus-decls.cpp?rev=171763&r1=171762&r2=171763&view=diff
==============================================================================
--- cfe/trunk/test/Index/comment-cplus-decls.cpp (original)
+++ cfe/trunk/test/Index/comment-cplus-decls.cpp Mon Jan  7 12:45:48 2013
@@ -162,7 +162,7 @@
 */
     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>
 
 class gslice

Modified: cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp?rev=171763&r1=171762&r2=171763&view=diff
==============================================================================
--- cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp (original)
+++ cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp Mon Jan  7 12:45:48 
2013
@@ -658,7 +658,7 @@
 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@&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.
 template<>
@@ -670,7 +670,7 @@
 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&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.
 template<typename T>

Modified: cfe/trunk/tools/libclang/CXComment.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXComment.cpp?rev=171763&r1=171762&r2=171763&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXComment.cpp (original)
+++ cfe/trunk/tools/libclang/CXComment.cpp Mon Jan  7 12:45:48 2013
@@ -911,7 +911,7 @@
   PPolicy.PolishForDeclaration = true;
   PPolicy.TerseOutput = true;
   ThisDecl->CurrentDecl->print(OS, PPolicy,
-                               /*Indentation*/0, /*PrintInstantiation*/true);
+                               /*Indentation*/0, /*PrintInstantiation*/false);
 }
   
 void CommentASTToXMLConverter::formatTextOfDeclaration(


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to