From 28cacc740d8065423b9a60e6feae998a3ecac9d9 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Mon, 7 Jan 2013 18:10:23 +0000 Subject: 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 --- clang/test/Index/comment-cplus-decls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/Index/comment-cplus-decls.cpp') 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 friend class valarray; }; -// CHECK: template <class T = unsigned int> class valarray {\n}\ntemplate <class T> class valarray +// CHECK: template <class T = unsigned int> class valarray {\n} template <class T> class valarray // CHECK: friend template <class T> class valarray class gslice -- cgit v1.2.3