aboutsummaryrefslogtreecommitdiff
path: root/test/Index/comment-cplus-decls.cpp
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
commitde7685487c5d628dd9fe64c4f861cd1888f50fc7 (patch)
tree53a21aaf4c9eebde9af749c584608db3410c69d3 /test/Index/comment-cplus-decls.cpp
parentc3cd2b0d538e4db78f1bcbedd0085e2005ce5c51 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/comment-cplus-decls.cpp')
-rw-r--r--test/Index/comment-cplus-decls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Index/comment-cplus-decls.cpp b/test/Index/comment-cplus-decls.cpp
index 29af712e1c..ed851d84fc 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}\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