summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-07 18:10:23 +0000
committerManuel Klimek <klimek@google.com>2013-01-07 18:10:23 +0000
commit28cacc740d8065423b9a60e6feae998a3ecac9d9 (patch)
tree8229435782851079b3cb178a37611df31a4f2a92 /clang/test
parent5bc364eb0587de079a54dc570d20ada46b195b81 (diff)
downloadbcm5719-llvm-28cacc740d8065423b9a60e6feae998a3ecac9d9.tar.gz
bcm5719-llvm-28cacc740d8065423b9a60e6feae998a3ecac9d9.zip
Fix parsing of variable declarations directly after a class / struct.
Previous indent: class A { } a; void f() { }; With this patch: class A { } a; void f() { } ; The patch introduces a production for classes and structs, and parses the rest of the line to the semicolon after the class scope. This allowed us to remove a long-standing wart in the parser that would just much the semicolon after any block. Due to this suboptimal formating some tests were broken. Some unrelated formatting tests broke; those hit a bug in the ast printing, and need to be fixed separately. llvm-svn: 171761
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/comment-cplus-decls.cpp2
-rw-r--r--clang/test/Index/comment-to-html-xml-conversion.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Index/comment-cplus-decls.cpp b/clang/test/Index/comment-cplus-decls.cpp
index 29af712e1ce..ed851d84fc8 100644
--- a/clang/test/Index/comment-cplus-decls.cpp
+++ b/clang/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}\ntemplate &lt;class T&gt; class valarray</Declaration>
+// CHECK: <Declaration>template &lt;class T = unsigned int&gt; class valarray {\n} template &lt;class T&gt; class valarray</Declaration>
// CHECK: <Declaration>friend template &lt;class T&gt; class valarray</Declaration>
class gslice
diff --git a/clang/test/Index/comment-to-html-xml-conversion.cpp b/clang/test/Index/comment-to-html-xml-conversion.cpp
index 1ab49d6fc01..139120ec051 100644
--- a/clang/test/Index/comment-to-html-xml-conversion.cpp
+++ b/clang/test/Index/comment-to-html-xml-conversion.cpp
@@ -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}\ntemplate &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 = 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>]
/// Aaa.
template<typename T>
OpenPOWER on IntegriCloud