[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D84306#2294952 , @MyDeveloperDay wrote: > Which bit do you find more complex? adding something to the FormatToken or > the use of the `is()` calls? I think mainly that a) the language doesn't support bitfields well yet, as ev

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Which bit to you find more complex? adding something to the FormatToken or the use of the `is()` calls? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new/ https://reviews.llvm.org/D84306 _

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. FWIW, finding this due to seeing the added complexity. Do you have data on what the difference is on clang-format for either overall memory use or performance? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-28 Thread Bruno Ricci via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf5acd11d2c0e: [clang-format][NFC] Be more careful about the layout of FormatToken. (authored by riccibruno). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-28 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D84306#2177985 , @MyDeveloperDay wrote: > Thank you for the patch, this LGTM, I think this kind of change should help > reduce memory usage and I feel improves the readability. Thanks for your review! Repository: rG LL

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. Thank you for the patch, this LGTM, I think this kind of change should help reduce memory usage and I feel improves the readability. Repository: rG LLVM Github Monorepo CHA

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-27 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 281019. riccibruno marked 2 inline comments as done. riccibruno added a comment. Remove a few missed `getPackingKind`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new/ https://reviews.llvm.org/D84306

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. a new minor Nits but looks good. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1488 (Style.ExperimentalAutoDetectBinPacking && - (Current.PackingKind == PPK_OnePerLine || + (Current.getPackingKind() == PPK_OnePerL

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 280730. riccibruno added a comment. Use `is` and `isNot`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new/ https://reviews.llvm.org/D84306 Files: clang/lib/Format/ContinuationIndenter.cpp clang/

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 3 inline comments as done. riccibruno added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:652 + (Current.isNot(TT_LineComment) || + Previous.getBlockKind() == BK_BracedInit)) { State.Stack.back().Indent = State.Column + S

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. I'm generally in agreement but I think we should let some others comment Comment at: clang/lib/Format/ContinuationIndenter.cpp:652 + (Current.isNot(TT_LineComment) || + Previous.getBlock

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/FormatToken.h:177 /// Indicates that this is the first token of the file. - bool IsFirst = false; + unsigned IsFirst : 1; educate me, why ``` unsigned IsFirst : 1; ``` here and not ``` b

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-07-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: MyDeveloperDay. riccibruno added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. The underlying ABI forces `FormatToken` to have a lot of padding. Currently (on x86-64 linux) `sizeof(For