summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/comment-to-html-xml-conversion.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2016-11-10 08:49:37 +0000
committerSerge Pavlov <sepavloff@gmail.com>2016-11-10 08:49:37 +0000
commita67a4d2f3c07bd589d395a5815dea2198a261162 (patch)
tree4126181c50f9c848610716438667e1e6b3e325e0 /clang/test/Index/comment-to-html-xml-conversion.cpp
parent3d75b62ffeb694c70f2745be6da658235076146a (diff)
downloadbcm5719-llvm-a67a4d2f3c07bd589d395a5815dea2198a261162.tar.gz
bcm5719-llvm-a67a4d2f3c07bd589d395a5815dea2198a261162.zip
Make output of -ast-print a valid C++ code.
Output generated by option -ast-print looks like C/C++ code, and it really is for plain C. For C++ the produced output was not valid C++ code, but the differences were small. With this change the output is fixed and can be compiled. Tests are changed so that output produced by -ast-print is compiled again with the same flags and both outputs are compared. Option -ast-print is extensively used in clang tests but it itself was tested poorly, existing tests only checked that compiler did not crash. There are unit tests in file DeclPrinterTest.cpp, but they test only terse output mode. Differential Revision: https://reviews.llvm.org/D26452 llvm-svn: 286439
Diffstat (limited to 'clang/test/Index/comment-to-html-xml-conversion.cpp')
-rw-r--r--clang/test/Index/comment-to-html-xml-conversion.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Index/comment-to-html-xml-conversion.cpp b/clang/test/Index/comment-to-html-xml-conversion.cpp
index 6c10efedeaf..9e25ff1b3ac 100644
--- a/clang/test/Index/comment-to-html-xml-conversion.cpp
+++ b/clang/test/Index/comment-to-html-xml-conversion.cpp
@@ -813,7 +813,7 @@ void comment_to_xml_conversion_10(T aaa, U bbb);
template<>
void comment_to_xml_conversion_10(int aaa, int bbb);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@F@comment_to_xml_conversion_10&lt;#I#I&gt;#I#I#</USR><Declaration>void comment_to_xml_conversion_10(int aaa, int bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@F@comment_to_xml_conversion_10&lt;#I#I&gt;#I#I#</USR><Declaration>template &lt;&gt; void comment_to_xml_conversion_10&lt;int, int&gt;(int aaa, int bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
/// Aaa.
template<typename T, typename U>
@@ -825,13 +825,13 @@ class comment_to_xml_conversion_11 { };
template<typename T>
class comment_to_xml_conversion_11<T, int> { };
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplatePartialSpecialization=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="partialSpecialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@SP&gt;1#T@comment_to_xml_conversion_11&gt;#t0.0#I</USR><Declaration>class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplatePartialSpecialization=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="partialSpecialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@SP&gt;1#T@comment_to_xml_conversion_11&gt;#t0.0#I</USR><Declaration>template &lt;typename T&gt; class comment_to_xml_conversion_11&lt;T, int&gt; {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
/// Aaa.
template<>
class comment_to_xml_conversion_11<int, int> { };
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassDecl=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@S@comment_to_xml_conversion_11&gt;#I#I</USR><Declaration>class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassDecl=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@S@comment_to_xml_conversion_11&gt;#I#I</USR><Declaration>template &lt;&gt; class comment_to_xml_conversion_11&lt;int, int&gt; {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
/// Aaa.
int comment_to_xml_conversion_12;
OpenPOWER on IntegriCloud