4967a710c84587c654b56c828382219c3937dacb |
|
20-Sep-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master Clang for rebase to r275480 Bug: http://b/31320715 This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from aosp/dev. Test: Build AOSP and run RenderScript tests (host tests for slang and libbcc, RsTest, CTS) Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/Format/ContinuationIndenter.cpp
|
87d948ecccffea9e9e37d0d053b246e2d6d6c47b |
|
04-Mar-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r256229 http://b/26987366 Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/Format/ContinuationIndenter.cpp
|
b6d6993e6e6d3daf4d9876794254d20a134e37c2 |
|
01-Jul-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r239765 Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/Format/ContinuationIndenter.cpp
|
58878f85ab89b13e9eea4af3ccf055e42c557bc8 |
|
06-May-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r235153 Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/Format/ContinuationIndenter.cpp
|
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 |
|
08-Apr-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r233350 Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Format/ContinuationIndenter.cpp
|
0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/Format/ContinuationIndenter.cpp
|
176edba5311f6eff0cad2631449885ddf4fbc9ea |
|
01-Dec-2014 |
Stephen Hines <srhines@google.com> |
Update aosp/master Clang for rebase to r222490. Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/Format/ContinuationIndenter.cpp
|
c568f1e98938584c0ef0b12ae5018ff7d90a4072 |
|
21-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for rebase to r212749. This also fixes a small issue with arm_neon.h not being generated always. Includes a cherry-pick of: r213450 - fixes mac-specific header issue r213126 - removes a default -Bsymbolic on Android Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Format/ContinuationIndenter.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Format/ContinuationIndenter.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Format/ContinuationIndenter.cpp
|
a7462b8ce22a3f754bf51eeeb01adafc42b32cea |
|
12-Nov-2013 |
Alexander Kornienko <alexfh@google.com> |
Remove extra whitespace instead of breaking the line in comments when possible. Summary: Solves the problem described in http://llvm.org/PR17756 Reviewers: klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2131 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
5486a421a47a8922337aa83ac3b0fbb098dc1fe4 |
|
12-Nov-2013 |
Alexander Kornienko <alexfh@google.com> |
Do not insert backslashes, when breaking line comments after preprocessor directives. Summary: This solves http://llvm.org/PR17536 Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2142 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
a7856d021a1f318f9319c0a3028f0d76e38b6ca1 |
|
09-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix alignment of ObjC string literals. This used to interfere with AlwaysBreakBeforeMultilineStrings. This fixes llvm.org/PR17856. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
8b156e2a040d7a652e821878b68822041f65d71a |
|
08-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve formatting of operators forced to new lines. Before: unsigned ContentSize = sizeof(int16_t) // DWARF ARange version number + sizeof(int32_t) // Offset of CU in the .debug_info section + sizeof(int8_t) // Pointer Size (in bytes) + sizeof(int8_t); // Segment Size (in bytes) After: unsigned ContentSize = sizeof(int16_t) // DWARF ARange version number + sizeof(int32_t) // Offset of CU in the .debug_info section + sizeof(int8_t) // Pointer Size (in bytes) + sizeof(int8_t); // Segment Size (in bytes) This fixes llvm.org/PR17687. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
deb61c5169531895a3cfa02d77b4d8f315f5e64b |
|
08-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve linebreaking and indentation for ObjC calls. Before: popup_wdow_.reset([[RenderWidgetPopupWindow alloc] iniithContentRect: NSMakRet(origin_global.x, origin_global.y, pos.width(), pos.height()) syeMask:NSBorderlessWindowMask bking:NSBackingStoreBuffered der:NO]); [self param:function( // parameter)] After: popup_wdow_.reset([[RenderWidgetPopupWindow alloc] iniithContentRect:NSMakRet(origin_global.x, origin_global.y, pos.width(), pos.height()) syeMask:NSBorderlessWindowMask bking:NSBackingStoreBuffered der:NO]); [self param:function( // parameter)] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
072ac6cfde19fb395d434b2bbcb66e210607cf1e |
|
08-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Properly indent ObjC calls wrapped before first selector Before: [self // break a:a aa:aa aaaaa:aaa]; After: [self // break a:a aa:aa aaaaa:aaa]; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
1a896a5a72d9af0259afe636535254c95dc6b355 |
|
08-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Make breaking before ternary operators configurable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
966e6d3a174856ff3fe3d6cfe294ebae832f6c09 |
|
07-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve ObjC variadic and binary expression parameters. Before: [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa]; [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa]; After: [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa]; [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa]; This addresses llvm.org/PR15349 and llvm.org/PR16185. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
16a8b0e7c53ce57fab033ad59f45c619564ff1ef |
|
07-Nov-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix corner case for brace alignment. Before: Constructor::Constructor() : some_value{ // aaaaaaa // } {} After: Constructor::Constructor() : some_value{ // aaaaaaa // } {} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
dc837b1722d8e071d9ec0434aea487dbdfd57853 |
|
30-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix indenting corner case with comment and else. Before: if (a) { f(); } // or else .. else { g(); } After: if (a) { f(); } // or else .. else { g(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
8437957c9da906c24d4e385869c05d8e601c664d |
|
30-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix whitespaces in include directives. Before (clang-format wouldn't change): #include "a.h" #include<a> After: #include "a.h" #include <a> This fixes llvm.org/PR16151. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
3c6aea7ac63265c769b5fe09e213ab1c4cee111e |
|
24-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Cleanup array initializer and dict initializer formatting. Significant changes: - Also recognize these literals with missing "@" for robustness. - Reorganize tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
c96894305223479789b990522b2877e766979f17 |
|
22-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix ObjC literal indentation in Google style. Style guide demands a two-space indent. Before: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; After: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
a07aa665a12ab23bef7aa4aedfe113dd8b13da57 |
|
22-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve formatting of ObjC array literals. Before: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; After: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; This fixes llvm.org/PR15231. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
a53bbae476f8f20d18250effb4cc3f110c9b8030 |
|
20-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve formatting of ObjC dict literals. Before: NSDictionary *d = @{ @"nam" : NSUserNam(), @"dte" : [NSDate date], @"processInfo" : [NSProcessInfo processInfo] }; After: NSDictionary *d = @{ @"nam" : NSUserNam(), @"dte" : [NSDate date], @"processInfo" : [NSProcessInfo processInfo] }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
49c77b2e702b02a0fbac7b817ccb73e7c128f9d9 |
|
18-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Don't force linebreak between return and multiline string. This looks ugly and leads to llvm.org/PR17590. Before (with AlwaysBreakBeforeMultilineStrings): return "aaaa" "bbbb"; After: return "aaaa" "bbbb"; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
9b3cb44cd2052aa7236c38b0ccb291221aab08f9 |
|
18-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve formatting of templated builder-type calls. Before: aaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaa().aaaaaaaaaaaaaaaaa().has< bbbbbbbbbbbbbbbbbbbbb>(); After: aaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaa() .aaaaaaaaaaaaaaaaaaaaaaaaaa() .has<bbbbbbbbbbbbbbbbbbbbb>(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
c2827ec708b1611f2b0717bebc423b17a857631e |
|
18-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Make continuation indent width configurable. Patch by Kim Gräsman. Thank you! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
f0fc89c358cdd0717c0e12eb4a90e4a6ce956e98 |
|
14-Oct-2013 |
Alexander Kornienko <alexfh@google.com> |
Keep track of indentation levels in static initializers for correct indentation with tabs. Summary: Store IndentationLevel in ParentState and use it instead of the Line::Level when indening. Also fixed incorrect indentation level calculation in formatFirstToken. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1797 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
b18c258390f794d8803ef5ebbb56fb77bfea7ba4 |
|
11-Oct-2013 |
Alexander Kornienko <alexfh@google.com> |
Don't break string literals inside preprocessor directives. Summary: This way we avoid breaking code which uses unknown preprocessor directives with long string literals. The specific use case in http://llvm.org/PR17035 isn't very common, but it seems to be a good idea to avoid this kind of problem anyway. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1813 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
ae76f7f850a9101a20191b10241ca72c23dc40dd |
|
11-Oct-2013 |
Manuel Klimek <klimek@google.com> |
Support formatting of preprocessor branches. We now correctly format: void SomeFunction(int param1, #ifdef X NoTemplate param2, #else template < #ifdef A MyType<Some> > #else Type1, Type2> #endif param2, #endif param3) { f(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
6e7f1934f489b48a53b8c9af314921c0e55ee5b5 |
|
09-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix template declaration line breaking with comment. Before, clang-format would always insert a linebreak before the comment in code like: template <typename T> // T can be A, B or C. struct S {}; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
cea014bd8d280070caeb27e4e6e33e5723b4226f |
|
08-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve indentation when deriving from templated classes. Before: struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< // aaaaaaaaaaaaaaaa> {}; struct aaaaaaaaaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa> {}; After: struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< // aaaaaaaaaaaaaaaa> {}; struct aaaaaaaaaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa> {}; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
19ccb1227f5dc338d4b2d9dbbaeaa973c293f8d0 |
|
08-Oct-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve constructor initializer linewrapping. Specifically make ConstructorInitializerAllOnOneLineOrOnePerLine work nicely with BreakConstructorInitializersBeforeComma. This fixes llvm.org/PR17395. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
e5321c400c76517f10ee6090556f6d87c150b826 |
|
01-Oct-2013 |
Alexander Kornienko <alexfh@google.com> |
Refactoring: split addTokenToState into two methods. Summary: Pure refactoring, should be no semantic changes. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1796 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
f78bf4a0132a3ea366ba3baadd9d6af26c617d11 |
|
30-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve alignment after 'return'. Previously, comments, could totally confuse it. Before: return // true if code is one of a or b. code == a || code == b; After: return // true if code is one of a or b. code == a || code == b; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
3d9ffcf3aa0ed84fa297e3c461bb84e48221aa2d |
|
27-Sep-2013 |
Alexander Kornienko <alexfh@google.com> |
Implemented tab usage only for indentation (http://llvm.org/PR17363) Summary: Changed UseTab to be a enum with three options: Never, Always, ForIndentation (true/false are still supported when reading .clang-format). IndentLevel should currently be propagated correctly for all tokens, except for block comments. Please take a look at the general idea before I start dealing with block comments. Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1770 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
48c099f45400e37ec1cde7de5eaee5cce65dbd42 |
|
27-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix formatting bug with comment in weird place. Before: template <typename T> // T should be one of {A, B}. void f() {} After: template <typename T> // T should be one of {A, B}. void f() {} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
2c2f729d10cb10324bf2e7871867f7bbc19ad358 |
|
16-Sep-2013 |
Alexander Kornienko <alexfh@google.com> |
When in pre-c++11 mode, treat _T("xxx") as a single string literal, repeat the _T() part around each fragment. This addresses http://llvm.org/PR17122 Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek, rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1640 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
5798120bc015360951d13a06e17501b909ecd21d |
|
13-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix incorrect enum parsing / layouting. Before: enum { Bar = Foo < int, int > ::value }; After: enum { Bar = Foo<int, int>::value }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
6f6154c5f5976e3e57f34f6a755bdfa95b7ff745 |
|
10-Sep-2013 |
Alexander Kornienko <alexfh@google.com> |
Correctly calculate OriginalColumn after multi-line tokens. Summary: This also unifies the handling of escaped newlines for all tokens. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1638 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
83a7dcdf5fce1bdf74ce985419d77a41a51abfa2 |
|
10-Sep-2013 |
Alexander Kornienko <alexfh@google.com> |
Calculate and store ColumnWidth instead of CodePointCount in FormatTokens. Summary: This fixes various issues with mixed tabs and spaces handling, e.g. when realigning block comments. Reviewers: klimek, djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1608 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
00e0f4315064734255171f013b534c6e32086d7a |
|
06-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix regression introduced by r190038. Before: Constructor() : aaaaaaaaaaaaaaaaaaaa(a), bbbbbbbbbbbbbbbbbbbbbbbb(b) { } After: Constructor() : aaaaaaaaaaaaaaaaaaaa(a), bbbbbbbbbbbbbbbbbbbbbbbb(b) { } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
db4813a3997fcf3864d1190f8021ef68e42cc057 |
|
06-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix regression introduced by r189337. Before: if (aaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) == 5) ... After: if (aaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) == 5) ... Also precompute startsBinaryExpression() to improve performance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
b77d741691a2775b5c31e29f021203cc659c26df |
|
06-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix comment formatting bugs in nested blocks. This fixes two issues: 1) The indent of a line comment was not adapted to the subsequent statement as it would be outside of a nested block. 2) A missing DryRun flag caused actualy breaks to be inserted in overly long comments while trying to come up with the best line breaking decisions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
0b62cc30c9aa462184de0435dc083d944a41d67f |
|
05-Sep-2013 |
Alexander Kornienko <alexfh@google.com> |
Handle zero-width and double-width characters in string literals and comments. Summary: Count column width instead of the number of code points. This also includes correct handling of tabs inside string literals and comments (with an exception of multiline string literals/comments, where tabs are present before the first escaped newline). Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1601 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
1a925bce18ea691d9bc7b2810715f37657ca8f51 |
|
05-Sep-2013 |
Daniel Jasper <djasper@google.com> |
Address post-commit review comments from r190038. Mostly additional comments :-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
ac2c974bc64d3767ad5e39451a874c50b3004b3a |
|
05-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix parsing and indenting lambdas. Before: void f() { other(x.begin(), x.end(), // [&](int, int) { return 1; }); } After: void f() { other(x.begin(), x.end(), // [&](int, int) { return 1; }); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
567dcf95424d69657f75e4bfd028967ca1f9eb8d |
|
05-Sep-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Enable formatting of nested blocks. Among other things, this enables (better) formatting lambdas and constructs like: MACRO({ long_statement(); long_statement_2(); }, { long_statement(); long_statement_2(); }, { short_statement(); }, ""); This fixes llvm.org/PR15381. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
4b762a91faac0473fa380ea9731992b24867e2e6 |
|
02-Sep-2013 |
Alexander Kornienko <alexfh@google.com> |
Store first and last newline position in the token text for string literals and comments. Summary: Store first and last newline position in the token text for string literals and comments to avoid doing .find('\n') for each possible solution. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1556 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
13d2aa5c8fbb62abf8531bc6e1b7aa89c60fba4f |
|
30-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix incorrect indentation. Before: aaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc( dddddddddddddddddddddddddddddd)); aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb( dddddddddddddddddddddddddddddd)); After: aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc( dddddddddddddddddddddddddddddd)); aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb( dddddddddddddddddddddddddddddd)); This was overlooked when interducing the new builder-type call detection in r189337. Also, some minor reorganization of a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
290824530199d9d3728edfbaeb5ccedb798d4498 |
|
30-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Don't indent builders relative to "return". While this looks kind of nice, it wastes horizontal space and does not seem to be common in the LLVM codebase. Before: return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT) .StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH) .Default(ORDER_TEXT); After: return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT) .StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH) .Default(ORDER_TEXT); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
eb331832830c51322a225a3de480189c7d6d7503 |
|
30-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix corner case in builder-type calls. Before: aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()->aaaaaaaaaaaaaae( 0)->aaaaaaaaaaaaaaa(); After: aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa() ->aaaaaaaaaaaaaae(0) ->aaaaaaaaaaaaaaa(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
dcc0c5bb7ce9a731ecbc0b8e8477979cd9e730c0 |
|
29-Aug-2013 |
Alexander Kornienko <alexfh@google.com> |
Better support for multiline string literals (including C++11 raw string literals). Summary: Calculate characters in the first and the last line correctly so that we only break before the literal when needed. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1544 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
f54617858a0df936746b7f521a8ffb032289d02f |
|
28-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve token breaking behavior. Two changes: * Don't add an extra penalty on breaking the same token multiple times. Generally, we should prefer not to break, but once we break, the normal line breaking penalties apply. * Slightly increase the penalty for breaking comments. In general, the author has put some thought into how to break the comment and we should not overwrite this unnecessarily. With a 40-column column limit, formatting aaaaaa("aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa"); Leads to: Before: aaaaaa( "aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa " "aaaaaaaaaaaaaaaa"); After: aaaaaa("aaaaaaaaaaaaaaaa " "aaaaaaaaaaaaaaaa " "aaaaaaaaaaaaaaaa"); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
7143a21706d951ad53b5167a4dcd750f5997d208 |
|
28-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix segfault in 'incomplete' macros. The code leading to a segfault was: #pragma omp threadprivate(y)), // long comment leading to a line break This fixes llvm.org/PR16513. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
d3fef0fe26da19685bdec6a1bd844505f604d593 |
|
27-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Format segments of builder-type calls one per line. This fixes llvm.org/PR14818. Before: return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT).StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT); After: return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT) .StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH) .Default(ORDER_TEXT); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
d489f8ceb735458b0e1f814e3f952b154f49c025 |
|
27-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Revamp builder-type call formatting. Previously builder-type calls were only correctly recognized in top-level calls. This fixes llvm.org/PR16981. Before: someobj->Add((new util::filetools::Handler(dir))->OnEvent1( NewPermanentCallback(this, &HandlerHolderClass::EventHandlerCBA)) ->OnEvent2(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBB)) ->OnEvent3(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBC)) ->OnEvent5(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBD)) ->OnEvent6(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBE))); After: someobj->Add((new util::filetools::Handler(dir)) ->OnEvent1(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBA)) ->OnEvent2(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBB)) ->OnEvent3(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBC)) ->OnEvent5(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBD)) ->OnEvent6(NewPermanentCallback( this, &HandlerHolderClass::EventHandlerCBE))); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
4df1ff96262b8bde75c6801ef42659f352aa2422 |
|
23-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix corner case for string splitting .. .. in conjunction with Style.AlwaysBreakBeforeMultilineStrings. Also, simplify the implementation by handling newly split strings and already split strings by the same code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
ed51c02f4c87ddb2d2f45193e4041921ac363f76 |
|
23-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Handle trailing commas in column layout of braced list. Before, this was causing errors. Also exit early in breakProtrudingToken() (before the expensive call to SourceManager::getSpellingColumnNumber()). This makes formatting huge (100k+-item) braced lists possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
d4a03dbb0bdbd4908375306283cb61813bd8f454 |
|
22-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Add column layout formatting for braced lists With this patch, braced lists (with more than 3 elements are formatted in a column layout if possible). E.g.: static const uint16_t CallerSavedRegs64Bit[] = { X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI, X86::R8, X86::R9, X86::R10, X86::R11, 0 }; Required other changes: - FormatTokens can now have a special role that contains extra data and can do special formattings. A comma separated list is currently the only implementation. - Move penalty calculation entirely into ContinuationIndenter (there was a last piece still in UnwrappedLineFormatter). Review: http://llvm-reviews.chandlerc.com/D1457 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
34f3d05d0ee625dfcac951e2851f212c4c1a8b83 |
|
21-Aug-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Indent relative to unary operators. Before: if (!aaaaaaaaaa( // break aaaaa)) { } After: if (!aaaaaaaaaa( // break aaaaa)) { } Also cleaned up formatting using clang-format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|
6b2afe445b3cfba4b8ae898f85f3540211bd65f8 |
|
16-Aug-2013 |
Daniel Jasper <djasper@google.com> |
Split UnwrappedLineFormatter into individual components. Goals: Structure code better and make components easier to use for future features (e.g. column layout for long braced initializers). No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Format/ContinuationIndenter.cpp
|