[PATCH] D80940: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name, allow clang-format to handle such cases

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 268163. MyDeveloperDay added a comment. Address review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80940/new/ https://reviews.llvm.org/D80940 Files: clang/lib/Format/FormatTokenLexer.cpp clang/lib/Format/FormatTokenLexer.h c

[PATCH] D80933: [clang-format] [PR46157] Wrong spacing of negative literals with use of operator

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 268166. MyDeveloperDay added a comment. Ensure no crash when CurrentToken is nullptr CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80933/new/ https://reviews.llvm.org/D80933 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Form

[PATCH] D83901: [clang] Disable a few formatting options for test/

2020-07-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. clang-format -n warnings before this change in clang/test/Analysis/*.cpp (clang-format -n *.cpp |& grep warning | wc -l) before = 6903 vs after=6595, if it helps I'd say this looks good. Most a very brief review of changes seem to be mainly whitespace/extra lin

[PATCH] D84090: [clang-format] Add SpaceAroundBitFieldColon option

2020-07-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. please clang-format Comment at: clang/include/clang/Format/Format.h:2236 + /// \endcode + bool SpaceAroundBitFieldColon; + We need to regenerate the ClangFormatStyleOptions.rst from this change run clang/docs/tool/dump_format_

[PATCH] D84090: [clang-format] Add SpaceAroundBitFieldColon option

2020-07-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In principle, this looks ok. Comment at: clang/unittests/Format/FormatTest.cpp:12163 "int oneTwoThree : 23 = 0;", Alignment); you are missing a CHECK_PARSE_BOOL test Repository: rG LLVM G

[PATCH] D84090: [clang-format] Add SpaceAroundBitFieldColon option

2020-07-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. you need to make a full contextdiff git diff -U Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84090/new/ https://reviews.llvm.org/D84090 ___ cfe-commits maili

[PATCH] D84090: [clang-format] Add SpaceAroundBitFieldColon option

2020-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Let’s do all 4, None, Both, Left, Right Neither is an odd word for non English speakers Also I before e can confuse the slightly dyslexic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84090/new/ https://reviews.ll

[PATCH] D84103: [clang-format] Make sure rst documentation matches comments

2020-07-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thanks for doing this.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84103/new/ https://reviews.llvm.org/D84103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D84090: [clang-format] Add BitFieldColonSpacing option

2020-07-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Nit:clang-format the patch Here is a Tip as to what I do (In case it helps other): 1. I generate the diff off the staged items so I've already git added all the files I'm working on. 2. then I can do `git clang-format`, this will fix up any files in the diff th

[PATCH] D84090: [clang-format] Add BitFieldColonSpacing option

2020-07-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a subscriber: djasper. MyDeveloperDay added a comment. > Thanks for assistance and review. And sorry about the extra noise. No worries on my part about the noise, firstly this was a really nice clean, quick review but also the noise is part of the learning for us all (especi

[PATCH] D84090: [clang-format] Add BitFieldColonSpacing option

2020-07-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. just reopening to formally accept Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84090/new/ https://reviews.llvm.org/D84090 __

[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-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-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-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] D77311: clang-format: [JS] detect C++ keywords.

2020-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. I think this LGTM and brings more clarity as its much easier to look for things in the positive than the negative Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77311/new/ https

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2020-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D33029#1951346 , @bbassi wrote: > @MyDeveloperDay Can you please share your thoughts on my comment above? I'm tempted to agree that perhaps having as an enumeration `BreakBeforeClosingBracket` with various options mig

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2020-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > I personally say fuck backwards compatibility when maintaining it requires > ever more workarounds to fix an obviously flawed abstraction, but I'm just > some dude and AFAIK the guys in charge support the status quo. When LLVM itself isn't prepared to run cla

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:164 + /// Parses CPP qualified function names. + bool parse_function_qname(FormatToken *Tok) const { +while (Tok && Tok->isOneOf(tok::coloncolon, tok::identifier)) { your

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:313 +// for example: +// void f(volatile ElfW(Addr)* addr = nullptr); +if (HasStarToken) { I assume it could be almost anything? void f(volatile ElfW(

[PATCH] D71512: [clang-format] Fix short block when braking after control statement

2020-04-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. This seems to LGTM, in the absence of any other input, I guess we have to rely on the tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71512/new/ https://reviews.

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Did you try putting 'ElfW and 'M' in the list of TypenameMacros? --- Language: Cpp BasedOnStyle: LLVM TypenameMacros: ['ElfW'] PointerAlignment: Left const ElfW(Addr)* foo(ElfW(Addr)* addr); const M(Addr) * foo(M(Addr) * addr); $ clang-format

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D75364#1966743 , @tamas.petz wrote: > Wow, I have missed that configuration option. > I will try it, I assume it should work. > > Looks like this change should be abandoned. To be honest, I forget what we've got too! ;

[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file

2020-04-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:2700 + if (std::error_code EC = Text.getError()) +return make_string_error(EC.message()); + std::error_code ParserErrorCode = if you return here IsSuitable will be true.. ==

[PATCH] D77039: [clang-format] Don't break multi block parameters on ObjCBreakBeforeNestedBlockParam

2020-04-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. what is changing in clang/docs/ClangFormatStyleOptions.rst? if nothing then remove from the diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77039/new/ https://reviews.llvm.org/D77039 __

[PATCH] D77682: [clang-format] Always break line after enum opening brace

2020-04-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Did you try: BreakBeforeBraces: Custom BraceWrapping: AfterEnum: true with AfterEnum:true $ clang-format enum.cpp enum { A, }; enum { B, C, D }; enum { E }; with AfterEnum:false $ clang-format enum.cpp e

[PATCH] D77682: [clang-format] Always break line after enum opening brace

2020-04-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think what is interesting is BreakBeforeBraces: Custom BraceWrapping: AfterEnum: false gets messed up completely by the `,` and that IS a bug in my view $ clang-format enum.cpp enum { A, }; enum { B, C, D }; enum { B, C,

[PATCH] D77682: [clang-format] Always break line after enum opening brace

2020-04-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I understand now what you are trying to achieve, could you capture something more like that in your tests too.. (just so we don't break this change later) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77682/new/ htt

[PATCH] D77682: [clang-format] Always break line after enum opening brace

2020-04-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77682/new/ https://reviews.llvm.org/D77682 ___

[PATCH] D77974: A Minor change to clang-format-diff.py

2020-04-13 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b379246c365: [clang-format] A Minor change to clang-format-diff.py (authored by MyDeveloperDay, committed by paulhoad ). Herald added a project: clang. Herald added a subscriber: cfe

[PATCH] D75034: [clang-format] use spaces for alignment with UT_ForContinuationAndIndentation

2020-04-13 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8111502d869: [clang-format] use spaces for alignment with UT_ForContinuationAndIndentation (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D77682: [clang-format] Always break line after enum opening brace

2020-04-13 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG072ae7c1e64f: [clang-format] Always break line after enum opening brace (authored by MyDeveloperDay, committed by paulhoad ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file

2020-04-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:2704 + if (ParserErrorCode == ParseError::Unsuitable) { +*IsSuitable = false; +return Style; I think this isn't needed won't it already be false from line @2695 Repository:

[PATCH] D80940: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name, allow clang-format to handle such cases

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D80940#2071247 , @curdeius wrote: > LGTM. > > For a second, I thought that you could simplify the code by removing this > @try condition (and calling the function > `FormatTokenLexer::tryTransformTryUsageForC()` only if

[PATCH] D80950: [clang-format] [PR44542,38872] String << String always get a forced newline.

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > IMO this *is* actually a good heuristic: `<<` between string literals > indicates some intent to break, and when the stream is entirely literals the > formatting is good. I take your point, how do you feel about an option even if the default was "BreakBetweenS

[PATCH] D80933: [clang-format] [PR46157] Wrong spacing of negative literals with use of operator

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6de794e2074b: [clang-format] [PR46157] Wrong spacing of negative literals with use of operator (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D80940: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name, allow clang-format to handle such cases

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a0484f04b62: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D80950: [clang-format] [PR44542,38872] String << String always get a forced newline.

2020-06-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @sammccall in the example LOG_IF(DFATAL, exp_await_calls < num_await_calls_) << "Equality condition can never be satisfied:" << " exp_await_calls=" << exp_await_calls << " num_await_calls_=" << num_await_calls_; I agree this is more pleasing,

[PATCH] D80950: [clang-format] [PR44542,38872] String << String always get a forced newline.

2020-06-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Just to add, I also think although because there are no tests to enforce it the primary reason is for when we see '\n', breaking the stream on endl but this is actually covered by another rule this also in mustBreak() if (Current.is(tok::lessless) && ((Pr

[PATCH] D71512: [clang-format] Fix short block when braking after control statement

2020-06-13 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0487f6f19cda: [clang-format] Fix short block when braking after control statement (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D82016: [clang-format] [PR462254] fix indentation of default and break correctly in whitesmiths style

2020-06-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, JakeMerdichAMD, curdeius, jbcoe, timwoj. MyDeveloperDay added projects: clang, clang-format. https://bugs.llvm.org/show_bug.cgi?id=46254 In ‘clang-format’, when using "BreakBeforeBraces: Whitesmiths". In a ‘switch’ b

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:13540 CHECK_PARSE_BOOL(AlignConsecutiveMacros); + CHECK_PARSE_BOOL(AlwaysBreakBeforeConceptDeclarations); CHECK_PARSE_BOOL(AllowAllArgum

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. In D79773#2124231 , @JohelEGP wrote: > constexpr plane(const plane& other) noexcept( > (detail::default_allocator_is_nothrow && >std::is_nothrow_copy_construct

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thank you I see now... super subtle but I'll take a look. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 275213. MyDeveloperDay added a comment. Still a work in progress but covers I think the case @JohelEGP found. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 Files: clang/docs/ClangFormatStyleOption

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:13540 CHECK_PARSE_BOOL(AlignConsecutiveMacros); + CHECK_PARSE_BOOL(AlwaysBreakBeforeConceptDeclarations); CHECK_PARSE_BOOL(AllowAllArgum

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 275356. MyDeveloperDay marked 4 inline comments as done. MyDeveloperDay added a comment. Addressed review comments Added one or two more tests NOTE: renamed the option from `AlwaysBreakBeforeConceptDeclarations` -> `BreakBeforeConceptDeclarations`

[PATCH] D82620: [clang-format] Preserve whitespace in selected macros

2020-07-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2706 + + For example: STRINGIZE + JakeMerdichAMD wrote: > curdeius wrote: > > Shouldn't there be a configuration example like what's in `ForEachMacros` > > doc? > > ``` > >

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thank you @JohelEGP please keep them coming, I'll try and update the patch as soon as I have some fixes, I kind of feel like we are addressing what would have just been downstream bugs anyway. (some are quite bizarre!) so lets squish as many of them as we can bef

[PATCH] D82767: clang-format: Explicitly use python3

2020-07-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. We may not be consistent across all of LLVM $ find . -name '*.py' -print -exec /usr/bin/head -2 {} \; | grep "#!" | sort | uniq -c 6 #! /usr/bin/env python 2 #! /usr/bin/env python3 2 #! /usr/bin/python 1 #!/bin/env python 1

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. https://reviews.llvm.org/D79773#2131680 has something to do with your .clang-format file, the base LLVM style seems fine. template concept bool EqualityComparable = requires(T a, T b) { { a == b } -> bool; }; vs template concept bool EqualityCo

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a subscriber: klimek. MyDeveloperDay added a comment. This issue is caused by the presence of the `;` in the requires clause (`0)>;`) inside the template declaration template requires std::invocable...> struct [[nodiscard]] constant : std::bool_constant < requires

[PATCH] D83564: [clang-format] PR46609 clang-format does not obey `PointerAlignment: Right` for ellipsis in declarator for pack

2020-07-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, curdeius, JakeMerdichAMD. MyDeveloperDay added projects: clang, clang-format. https://bugs.llvm.org/show_bug.cgi?id=46609 Ensure `*...` obey they left/middle/right rules of Pointer alignment Repository: rG LLVM Gi

[PATCH] D83564: [clang-format] PR46609 clang-format does not obey `PointerAlignment: Right` for ellipsis in declarator for pack

2020-07-12 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG65dc97b79eb1: [clang-format] PR46609 clang-format does not obey `PointerAlignment: Right` for… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-07-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/MacroExpander.cpp:150 +Tok->MacroCtx.ExpandedFrom.push_back(ID); +if (First) { + Tok->MacroCtx.StartOfExpansion = true; elide braces? Comment at: clang/unittests/Fo

[PATCH] D27651: [clang-format] Even with AlignConsecutiveDeclarations, PointerAlignment: Right should keep *s and &s to the right

2020-06-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I confirm this is still an issue as of v11 (trunk) and it looks like D21279: [clang-format] Fix some issues in clang-format's AlignConsecutive modes was landed even though its not closed. (the code behind D21279

[PATCH] D82620: [clang-format] Preserve whitespace in selected macros

2020-06-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82620/new/ https://reviews.llvm.org/D82620 ___

[PATCH] D82016: [clang-format] [PR462254] fix indentation of default and break correctly in whitesmiths style

2020-06-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay closed this revision. MyDeveloperDay added a comment. closed by commit rGeb50838ba08d: [clang-format] [PR462254] fix indentation of default and break correctly in… Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-29 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 this, I’m happy with this and can take a look at removing the os.walk I agree it might be better/quicker Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. The net result is an actual reduction in the overall % F12256151: image.png Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82707/new/ https://reviews.llvm.org/D82707 __

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D82707#2118796 , @njames93 wrote: > In D82707#2118772 , @MyDeveloperDay > wrote: > > > The net result is an actual reduction in the overall % > > > > F12256151: image.png

[PATCH] D78642: [clang-format] Handle C# property accessors when parsing lines

2020-04-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1344 addUnwrappedLine(); FormatTok->Type = TT_FunctionLBrace; parseBlock(/*MustBeDeclaration=*/false); previously set and get would break based

[PATCH] D78642: [clang-format] Handle C# property accessors when parsing lines

2020-04-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:249 + "public string Host { set; get; }"); verifyFormat("[TestMethod(\"start\", HelpText = \"Starts the server " is this just a personal choice? or ba

[PATCH] D78642: [clang-format] Handle C# property accessors when parsing lines

2020-04-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1344 addUnwrappedLine(); FormatTok->Type = TT_FunctionLBrace; parseBlock(/*MustBeDeclaration=*/false); jbcoe wrote: > MyDeveloperDay wrote: > >

[PATCH] D78869: clang-format: Add ControlStatementsExceptForEachMacros option to SpaceBeforeParens

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Could you add to the review description a link to the systemd style guide that says it should be like this? Comment at: clang/docs/ClangFormatStyleOptions.rst:2311 + * ``SBPO_ControlStatementsExceptForEachMacros`` (in configuration: +``C

[PATCH] D69573: [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Let me look into this a little, I'd prefer we fixed the corner cases than reverted the lot (https://bugs.llvm.org/show_bug.cgi?id=45357) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69573/new/ https://reviews.llvm.

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 260171. MyDeveloperDay added a comment. More test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78879/new/ https://reviews.llvm.org/D78879 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp Index: cl

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: sylvestre.ledru, mitchell-stellar, sammccall. MyDeveloperDay added projects: clang, clang-format. Herald added a subscriber: cfe-commits. MyDeveloperDay updated this revision to Diff 260171. MyDeveloperDay added a comment. MyDeve

[PATCH] D78869: clang-format: Add ControlStatementsExceptForEachMacros option to SpaceBeforeParens

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I've added a couple of others reviewers to comment, I don't personally mind as I don't use the ForEach Macros. It feels kind of funny to me to differentiate just the for macros from for,if,while,for.. (I guess I'm struggling to understand why you wouldn't just

[PATCH] D78869: clang-format: Add ControlStatementsExceptForEachMacros option to SpaceBeforeParens

2020-04-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:982 + " BOOST_FOREACH(Item *item, itemlist) {}\n" + " UNKNOWN_FORACH(Item * item, itemlist) {}\n" + "}", UNKNOWN_FOREACH? CHANGES

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2820 + if (Right.is(tok::star) && Left.is(TT_TemplateCloser)) +return false; if (Right.isOneOf(tok::star, tok::amp, tok::ampamp)) { -

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @sylvestre.ledru I'm taking a quick look at formatting the original bug in gecko and whilst the last windows snapshot (Feb 2020) shows the bug $ clang-format --version clang-format version 11.0.0 nsTArray.h:939:29: warning: code should be clang-formatted

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a subscriber: hans. MyDeveloperDay added a comment. So for the Mozilla case mentioned in the bug report we either need to ask @hans if D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107) can go into the v10 branch

[PATCH] D78909: [clang-format] NFC clang-format the clang-format sources

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: mitchell-stellar, sylvestre.ledru, Abpostelnicu, Wawha, jbcoe. MyDeveloperDay added projects: clang, clang-format. Herald added a subscriber: cfe-commits. In recent patches the clang-format code has become un-formatted, correct

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 260261. MyDeveloperDay added a comment. @sylvestre.ledru , @Abpostelnicu I believe to fix your original request you need a combination of D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107)

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 260266. MyDeveloperDay added a comment. Need to skip over the template or we won't see this as needing to break on the return type CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78879/new/ https://reviews.llvm.org/D78879 Files: clang/lib/F

[PATCH] D78915: [clang-format] Improved parser for C# properties

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. Can you please clang-format the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78915/new/ https://reviews.llvm.or

[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Were you able to rerun these tests? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72326/new/ https://reviews.llvm.org/D72326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D78915: [clang-format] Improved parser for C# properties

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think if this code is only used by C# which the first if suggests, we should be OK, just tidy up a bit with the old code and I think this is fine. Thank you, so great to have other C#'ers doing this ;-) "Clang format all the things..." Com

[PATCH] D78909: [clang-format] NFC clang-format the clang-format sources

2020-04-27 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf594e3d2ab92: [clang-format] NFC clang-format the clang-format sources (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78909/new/

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Before looking into the merit of the change, it needs a couple of things - This needs unit tests in clang/unittests/Format to demonstrate the problem and test this fixing it - This also needs the ClangStyleOptions.rst file generated with the clang/tools/dump_styl

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think the name should be `AllowShortEnumsOnASingleLine` As once the enum goes over a certain width it will revert to as it was before. enum { EOF, VOID, CHAR, SHORT, DOT, NUMBER, IDENTIFIER } A; vs enum { EOF, VOID, CHAR, SHORT, INT,

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. So it doesn't overcome the trailing "," issue. (which is sometimes used to put enums on multiple lines) - (NOTE: maybe it shouldn't) --- Language: Cpp BasedOnStyle: LLVM AllowEnumsOnASingleLine: true enum { B, C, D, } A, B; vs enu

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:1143 Style.PenaltyReturnTypeOnItsOwnLine = 1000; + Style.AllowEnumsOnASingleLine = false; Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None; You'll need to fix up th

[PATCH] D78694: [clang-format] Fix lambda with ellipsis in return type

2020-04-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. Me too LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78694/new/ https://reviews.llvm.org/D78694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D79008: [clang-format] insert space after C# keyword var in var (key, value)

2020-04-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. LGTM, thank you Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79008/new/ https://reviews.llvm.org/D79008

[PATCH] D79000: [clang-format] C# property formatting can be controlled by config options

2020-04-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Do you think we need to support verifyFormat(R"(// public class SaleItem { public decimal Price { get; set; } })"Style); Is that currently possible, and what if users actually want? public string Host { set; get; } Do you thin

[PATCH] D79022: [clang-format] Fix a bug causing BeforeLambdaBody to affect brace initialiser formatting

2020-04-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. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79022/new/ https://reviews.llvm.org/D79022 ___

[PATCH] D79020: [clang-format] Correct the AfterControlStatement configuration option output style

2020-04-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. This LGTM, yeah not sure about how this can be tested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79020/new/ https://reviews.

[PATCH] D78982: [clang-format] Fix Microsoft style for C++ enums

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:721 - -**InsertTrailingCommas** (``TrailingCommaStyle``) can be set to ``TCS_Wrapped`` - to insert trailing commas in container literals (arrays and objects) that wrap ? ar

[PATCH] D78982: [clang-format] Fix Microsoft style for C++ enums

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:721 - -**InsertTrailingCommas** (``TrailingCommaStyle``) can be set to ``TCS_Wrapped`` - to insert trailing commas in container literals (arrays and objects) that wrap asmi

[PATCH] D73768: clang-format: [JS] document InsertTrailingCommas.

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm trying to prevent this from getting deleted in D78982: [clang-format] Fix Microsoft style for C++ enums @mprobst When you added this documentation did you add it to Format.h and regenerate the rst text. ClangFormatStyleOptio

[PATCH] D73354: clang-format: insert trailing commas into containers.

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:563 + }; + + TrailingCommaStyle InsertTrailingCommas; I think we need to add some text in here to ensure it gets documented automatically in ClangFormatStyleOptions.rst rathe

[PATCH] D78982: [clang-format] Fix Microsoft style for C++ enums

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. see D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated this should be handled separately. Comment at: clang/docs/ClangFormatStyleOptions.rst:721 - -**I

[PATCH] D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1752 LngFunctionDeclaration(); +**InsertTrailingCommas** (``TrailingCommaStyle``) NOT

[PATCH] D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: mprobst, krasimir, mitchell-stellar, asmith. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay edited the summary of this revision. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline com

[PATCH] D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D79095#2010250 , @krasimir wrote: > Awesome! Thank you! > Now that we've got "clang/phabricator/lint/git" robots that leave comments > on patches, we may want to think about a way to have this automatically > enforced

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:1143 Style.PenaltyReturnTypeOnItsOwnLine = 1000; + Style.AllowShortEnumsOnASingleLine = (Language != FormatStyle::LK_Cpp); Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. Sorry please adjust the patch to remove the un-related changes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78982/new/ https://reviews.llvm.org/D78982 __

[PATCH] D78879: [clang-format] [PR45357] Fix issue found with operator spacing

2020-04-30 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb01dca500857: [clang-format] [PR45357] Fix issue found with operator spacing (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7887

<    1   2   3   4   5   6   7   8   9   10   >