aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-01-07 18:45:48 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-01-07 18:45:48 +0000
commit27c2cb24d5e2e9fda68b929c6d03c761196d8e2d (patch)
tree582ce48193216a0a1826122ff0dcc09b0bad5a1f
parentde7685487c5d628dd9fe64c4f861cd1888f50fc7 (diff)
Comment to XML conversion: no, we don't want to print instantiations for the
<Declaration> tag git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171763 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Index/comment-cplus-decls.cpp2
-rw-r--r--test/Index/comment-to-html-xml-conversion.cpp4
-rw-r--r--tools/libclang/CXComment.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/Index/comment-cplus-decls.cpp b/test/Index/comment-cplus-decls.cpp
index ed851d84fc..2fa688c3d7 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 &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
diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp
index 139120ec05..45f8df3618 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@&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 @@ 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&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>
diff --git a/tools/libclang/CXComment.cpp b/tools/libclang/CXComment.cpp
index d831885e27..d72403d87f 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(