diff options
author | Manuel Klimek <klimek@google.com> | 2013-01-04 23:34:14 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-01-04 23:34:14 +0000 |
commit | d4397b99e2fcb189002d04410d7c3bf85ab4bba3 (patch) | |
tree | 3ffd5f59e669477f4d6fadf7b49e6bdaedc20ff4 /test/Index/comment-objc-decls.m | |
parent | 7a77f1994bdbe67db361b851a0907cf49fddfd91 (diff) |
Various fixes to clang-format's macro handling.
Some of this is still pretty rough (note the load of FIXMEs), but it is
strictly an improvement and fixes various bugs that were related to
macro processing but are also imporant in non-macro use cases.
Specific fixes:
- correctly puts espaced newlines at the end of the line
- fixes counting of white space before a token when escaped newlines are
present
- fixes parsing of "trailing" tokens when eof() is hit
- puts macro parsing orthogonal to parsing other structure
- general support for parsing of macro definitions
Due to the fix to format trailing tokens, this change also includes a
bunch of fixes to the c-index tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/comment-objc-decls.m')
-rw-r--r-- | test/Index/comment-objc-decls.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Index/comment-objc-decls.m b/test/Index/comment-objc-decls.m index 6682ea320f..88e04714c4 100644 --- a/test/Index/comment-objc-decls.m +++ b/test/Index/comment-objc-decls.m @@ -30,7 +30,7 @@ */ + ClassMethodMyProto; @end -// CHECK: <Declaration>@protocol MyProto\n@end</Declaration> +// CHECK: <Declaration>@protocol MyProto @end</Declaration> // CHECK: <Declaration>- (unsigned int)MethodMyProto:(id)anObject inRange:(unsigned int)range;</Declaration> // CHECK: <Declaration>@optional\n @property(readwrite, copy, atomic) id PropertyMyProto;</Declaration> // CHECK: <Declaration>+ (id)ClassMethodMyProto;</Declaration> @@ -108,7 +108,7 @@ */ @property (copy) id PropertyMyClassCategory; @end -// CHECK: <Declaration>@interface MyClass(Category)\n@end</Declaration> +// CHECK: <Declaration>@interface MyClass(Category) @end</Declaration> // CHECK: <Declaration>- (void)MethodMyClassCategory;</Declaration> // CHECK: <Declaration>@property(readwrite, copy, atomic) id PropertyMyClassCategory;</Declaration> // CHECK: <Declaration>- (id)PropertyMyClassCategory;</Declaration> @@ -162,7 +162,7 @@ */ - (void) setPropertyMyClassCategory : (id) arg {} @end -// CHECK: <Declaration>@implementation MyClass(Category)\n@end</Declaration> +// CHECK: <Declaration>@implementation MyClass(Category) @end</Declaration> // CHECK: <Declaration>- (void)MethodMyClassCategory;</Declaration> // CHECK: <Declaration>- (id)PropertyMyClassCategory;</Declaration> // CHECK: <Declaration>- (void)setPropertyMyClassCategory:(id)arg;</Declaration> @@ -172,4 +172,4 @@ */ @implementation NSObject @end -// CHECK: <Declaration>@implementation NSObject@end</Declaration> +// CHECK: <Declaration>@implementation NSObject @end</Declaration> |