History log of /external/clang/test/Index/comment-c-decls.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2f1ac41a6d8d202dcc39ab8eb56ccea823dc062e 21-Jan-2013 Manuel Klimek <klimek@google.com> Fixes formatting of empty blocks.

We now only put empty blocks into a single line, if all of:
- all tokens of the structural element fit into a single line
- we're not in a control flow statement

Note that we usually don't put record definitions into a single line, as
there's usually at least one more token (the semicolon) after the
closing brace. This doesn't hold when we are in a context where there is
no semicolon, like "enum E {}".

There were some missing tests around joining lines around the corner
cases of the allowed number of columns, so this patch adds some.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c
36fab8d70eee342d66e03c9b09c029f126196103 10-Jan-2013 Manuel Klimek <klimek@google.com> Do not add newline in empty blocks.

void f() {}
now gets formatted in one line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c
46ef852618b18bc79e403b37a12c9b692e76126b 10-Jan-2013 Daniel Jasper <djasper@google.com> Improvements to function type and ObjC block formatting.

Before: int (^myBlock) (int) = ^(int num) {}
A<void ()>;
int (*b)(int);

After: int (^myBlock)(int) = ^(int num) {}
A<void()>;
int(*b)(int);

For function types and function pointer types, this patch only makes
the behavior consistent (for types that are keywords and other types).
For the latter function pointer type declarations, we'll probably
want to add a space after "int".

Also added LangOpts.Bool = 1, so we handle "A<bool()>" appropriately
Moved the LangOpts-settings to a public place for use by tests
and clang-format binary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c
886568dc24eb0a1ccf73bf32d1eafa8fd4008cc6 09-Jan-2013 Daniel Jasper <djasper@google.com> Fix ObjC block declarations.

Before: int ( ^ Block1) (int, int) = ^ (int i, int j)
After: int (^Block1) (int, int) = ^(int i, int j)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c
d4397b99e2fcb189002d04410d7c3bf85ab4bba3 05-Jan-2013 Manuel Klimek <klimek@google.com> 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
/external/clang/test/Index/comment-c-decls.c
9c10d6157164ce3b6af1deef39d661c579e0afc3 21-Dec-2012 Daniel Jasper <djasper@google.com> Temporary fix of tests to make buildbots happy.

Permanent solution coming up after checking back with Fariborz/Douglas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c
154120cde4f56ed04261bab302fdbbed1a7f080b 20-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Add objective-C style formatting to clang format and
use it to format xml declaration tags.
// rdar://12378714


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c
3e2fe86dd0dd65bff254e3bbdc0ea8df9282dc35 04-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Testing C declarations embedded in
<declaration> tag of Comment XML and fixed a
missing block literal printout as result of the testing.
// rdar://12378714


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/comment-c-decls.c