[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-09-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:586 IO.mapOptional("SortIncludes", Style.SortIncludes); IO.mapOptional("SortJavaStaticImport", Style.SortJavaStaticImport); IO.mapOptional("SortUsingDeclarations", Style.SortUsingDeclarat

[PATCH] D88084: [clang-format] Changed default styles BraceWrappping bool table to directly use variables

2020-09-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In the examples you give here.. (and I have a feeling there are others in the tests) some of these fields are the same in all 3 cases i.e. `SplitEmptyRecord, SplitEmptyFunction and SplitEmptyNamespace` In which case why doesn't BraceWrapping have a constructor th

[PATCH] D88084: [clang-format] Changed default styles BraceWrappping bool table to directly use variables

2020-09-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I noticed the pre-merge tests failed! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88084/new/ https://reviews.llvm.org/D88084 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2020-09-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think if you have a proposal for changing the behavior lets see the patch and how it impacts the existing unit tests something tells me these tests are going to change? // A lambda passed as arg0 is always pushed to the next line. verifyFormat("SomeFunction

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2020-09-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @oleg.smolsky I agree, what you have here covers a myriad of other cases and was committed in 2018, we can't call this commit a regression it was a feature ;-), if we want to improve the feature that is something else. Repository: rL LLVM CHANGES SINCE LAST

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:2181 + /// \endcode + bool SpaceBeforePointerQualifiers; + I wonder if a request would ever say they wanted this Space before to be Left/Middle/Right? perhaps this should not

[PATCH] D88239: [clang-format] Fix spaces around */& in multi-variable declarations

2020-09-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2889 + return true; +return Style.PointerAlignment != FormatStyle::PAS_Left; } I wish more of these horrendous expressions all over the code were written like this,

[PATCH] D88296: [clang-format] De-duplicate includes with leading or trailing whitespace.

2020-09-25 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, generally I think clang-format seems to remove trailing spaces anyway so it might be that the duplicate might disappear on the second format. but I'm good with this

[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] D86597: [Tooling][Format] Treat compound extensions (foo.bar.cc) as matching foo.h

2020-08-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/D86597/new/ https://reviews.llvm.org/D86597 _

[PATCH] D86581: [clang-format] Handle shifts within conditions

2020-08-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think I like your solution better than mine D79293: [clang-format] [PR45218] Fix an issue where < and > and >> in a for loop gets incorrectly interpreted at a TemplateOpener/Closer , could you look at my unit tests and consider

[PATCH] D86581: [clang-format] Handle shifts within conditions

2020-08-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. I think this LGTM and the solution is much more elegant than mine! You were not stepping on my toes, I'm always happy for someone else to take things over and this is a much sm

[PATCH] D86581: [clang-format] Handle shifts within conditions

2020-08-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @Saldivarcher do you have commit access? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86581/new/ https://reviews.llvm.org/D86581 ___ cfe-commits mailing list cfe-commits@

[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier

2020-08-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 for these updates Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86711/new/ https://reviews.llvm.org/D86711 _

[PATCH] D86716: [clang-format] Detect pointer qualifiers in cast expressions

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

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:69 - void verifyFormat(llvm::StringRef Expected, llvm::StringRef Code, -const FormatStyle &Style = getLLVMStyle()) { + void _verifyFormat(const char *File, int Line, ll

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm wondering if this could be used to help the CUDA usages of clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86782/new/ https://reviews.llvm.org/D86782 ___ cf

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-02 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/D86960/new/ https://reviews.llvm.org/D86960 _

[PATCH] D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier

2020-09-04 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/D86775/new/ https://reviews.llvm.org/D86775 _

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-04 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, I've certainly been bit myself in the past with not knowing which test actually failed especially when they are all foo() something.. thank you Repository: rG LLV

[PATCH] D86941: [clang-format] Add a test showing the current config file list parsing

2020-09-04 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/D86941/new/ https://reviews.llvm.org/D86941 _

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-09-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm not a C++ language lawyer so I'm not sure which standard introduce enum inheritance? (maybe its something we could always do?), if its a recent change we just need to ensure we are conforming to the C++ version that is needed to build clang. Apart from that

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

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

[PATCH] D86950: [clang-format] Check that */& after typename macros are pointers/references

2020-09-04 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/D86950/new/ https://reviews.llvm.org/D86950 _

[PATCH] D87007: [clang-format] Correctly parse function declarations with TypenameMacros

2020-09-04 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/D87007/new/ https://reviews.llvm.org/D87007 _

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-09-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. Assuming it builds with minimum required c++ compiler Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87006/new/ https://reviews.l

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM, I think we need something like this for those keywords/macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86782/new/ https://reviews.llvm.org/D86782 ___

[PATCH] D86930: [clang-format] Handle typename macros inside cast expressions

2020-09-04 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/D86930/new/ https://reviews.llvm.org/D86930 _

[PATCH] D86137: Add ignore-unknown-options flag to clang-format.

2020-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This has caught me out from time to time, but the presence of such an option can lead to users mixing clang-format versions which could lead to flip/flopping of changes, so I'm not 100% sure it won't drive bad behaviour. However breaking based on the option can b

[PATCH] D87201: [clang-format] Add a option for the position of Java static import

2020-09-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. Thanks for the patch, You need to generate a fill context diff (see Contributing to LLVM) ensure the diff is clang-formatted itself (can't quite tell if it is or not)

[PATCH] D86137: Add ignore-unknown-options flag to clang-format.

2020-09-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added subscribers: sammccall, JDevlieghere, aaron.ballman. MyDeveloperDay added a comment. > Regarding not touching the LLVM support library: I'd love to find a way, but > as clang-format uses the >> operator We need to find some reviewers who look after a wider area of LLVM, if y

[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

2020-09-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thanks for the patch, I think this looks like a comprehensive improvement, a new nits only Comment at: clang/lib/Format/TokenAnnotator.cpp:2427 + // inside a function this should always be treated as a variable. + return CouldBeTypeList && Lin

[PATCH] D87201: [clang-format] Add a option for the position of Java static import

2020-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1970 + but this behavior is changed by another option, + ``JavaStaticImportAfterImport``. Can you add a test that shows if the sorting is still in the groups, i.e. I can

[PATCH] D79293: [clang-format] [PR45218] Fix an issue where < and > and >> in a for loop gets incorrectly interpreted at a TemplateOpener/Closer

2020-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay abandoned this revision. MyDeveloperDay added a comment. Better solution here D86581: [clang-format] Handle shifts within conditions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79293/new/ https://reviews.llvm.org/D79293 __

[PATCH] D86581: [clang-format] Handle shifts within conditions

2020-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc81dd3d159ab: [clang-format] Handle shifts within conditions (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86581/new/ https://

[PATCH] D86581: [clang-format] Handle shifts within conditions

2020-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @Saldivarcher this should be landed now, please validate Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86581/new/ https://reviews.llvm.org/D86581 ___ cfe-commits mailing l

[PATCH] D87291: [clang-format][regression][PR47461] ifdef causes catch to be seen as a function

2020-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: JakeMerdichAMD, krasimir, arichardson, curdeius. MyDeveloperDay added projects: clang-format, clang. MyDeveloperDay requested review of this revision. https://bugs.llvm.org/show_bug.cgi?id=47461 The following change D80940: [cl

[PATCH] D87291: [clang-format][regression][PR47461] ifdef causes catch to be seen as a function

2020-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Note to self, other things could cause the same issue try // comment { try /* comment */ { Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87291/new/ https://reviews.llvm.org/D87291 ___

[PATCH] D87201: [clang-format] Add a option for the position of Java static import

2020-09-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM, I'm happy if @JakeMerdichAMD is Comment at: clang/include/clang/Format/Format.h:1708 + /// \endcode + bool JavaStaticImportAfterImport; + bc-lee wrote: > JakeMerdichAMD wrote: > > M

[PATCH] D87352: Fix typo in doc ClangFormatStyleOptions.rst

2020-09-09 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 for doing this.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87352/new/ https://reviews.llvm.org/D87352 _

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D92257#2435906 , @lebedev.ri wrote: > In D92257#2435902 , @MyDeveloperDay > wrote: > >> In D92257#2435899 , >> @HazardyKnusperkeks wrote:

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. Could we consider dropping the maximum? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92257/new/ https://reviews.llvm.

[PATCH] D92753: [clang-format] Add IndentPragma style to eliminate common clang-format off scenario

2020-12-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17676-17684 +format("void foo() {\n" + "#if 1\n" + " #pragma omp simd\n" + " for (int k = 0; k < 10; k++) {\n" +

[PATCH] D92822: [clang-format] [NFC] Fix spelling and grammatical errors in IncludeBlocks text

2020-12-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: HazardyKnusperkeks, curdeius, JakeMerdichAMD, klimek. MyDeveloperDay added projects: clang-format, clang. MyDeveloperDay requested review of this revision. Fix spelling mistake Leave space after `.` and before beginning of next

[PATCH] D92753: [clang-format] Add IndentPragma style to eliminate common clang-format off scenario

2020-12-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17676-17684 +format("void foo() {\n" + "#if 1\n" + " #pragma omp simd\n" + "

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > And where do I do that? Also I did not think I would not have a chance of > getting the access so early. https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D92922: [clang-format] PR42434 Remove preprocessor and pragma lines from ObjectiveC guess

2020-12-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: curdeius, krasimir, JakeMerdichAMD. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. clang-format see the `disable:` in __pragma(waring(disable:)) as ObjectiveC method call

[PATCH] D92922: [clang-format] PR42434 Remove preprocessor and pragma lines from ObjectiveC guess

2020-12-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 310524. MyDeveloperDay added a comment. add support for additional _Pragma CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92922/new/ https://reviews.llvm.org/D92922 Files: clang/lib/Format/Format.cpp clang/unittests/Format/FormatTest.cpp

[PATCH] D92822: [clang-format] [NFC] Fix spelling and grammatical errors in IncludeBlocks text

2020-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG254677e9ed4e: [clang-format] [NFC] Fix spelling and grammatical errors in IncludeBlocks text (authored by MyDeveloperDay). Repository: rG LLVM Git

[PATCH] D92922: [clang-format] PR42434 Remove preprocessor and pragma lines from ObjectiveC guess

2020-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7b2d62fd7f7b: [clang-format] PR42434 Remove preprocessor and pragma lines from ObjectiveC… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D92753: [clang-format] Add IndentPragma style to eliminate common clang-format off scenario

2020-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. MyDeveloperDay marked an inline comment as done. Closed by commit rGe9e6e3b34a8e: [clang-format] Add IndentPragma style to eliminate common clang-format off… (authored by MyDeveloperDay). Repository: rG LLVM Github Monore

[PATCH] D93170: [clang-format][NFC] Expand BreakBeforeBraces examples

2020-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. We should have the same examples added to the unit tests so we know they are correct (and stay correct) But I really appreciate the documentation effort Repository: rG LLVM

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This didn't really address the comments, what is the point of the maximum? what if the maximum is > the ColumnLimit? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92257/new/ https://reviews.llvm.org/D92257

[PATCH] D91245: [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

2020-12-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:7766 + verifyFormat("co_await *a;", PASLeftStyle); + verifyFormat("co_yield *a", PASLeftStyle); } maybe add, just to clarify it. verifyFormat("return *a", PASLeftStyle);

[PATCH] D91245: [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:7759-7761 + // The default setting for PointerAlignment is PAS_Right. + // But if we set PointerAlignment as PAS_Left, the formatter + // would mis-format the pointer alignment. ---

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I generally don't have the same aversion to new options than others have, but can you point out a style guide that might want this option. (that is kind of the process) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:12115 + " break;\n" "}", InheritanceStyle); maybe add a `default` example with {} try not to change existing tests just add you

[PATCH] D91245: [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Aside: Would you be prepared to take a look at D34225: [clang-format] Teach clang-format how to handle C++ coroutines which is pretty much been abandoned, and see if there is anything there that might help the co_routinues suppor

[PATCH] D91245: [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. not that rare it seems https://github.com/search?q=%22co_return+%28%22&type=code https://github.com/search?q=%22for+co_await+%28%22&type=code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91245/new/ https://reviews.llvm.org/D91245 __

[PATCH] D91245: [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I don't like seeing users having to use ```// clang-format off``` auto try_sequence = [](int& ref) -> return_ignore { /* clang-format off */ for co_await(int v : return_random_int()) ref = v; /* clang-fo

[PATCH] D93296: [clang-format] PR35514 brace-init member initializers in function-try-blocks are not formatted correctly

2020-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, curdeius, JakeMerdichAMD, mnem. MyDeveloperDay added projects: clang-format, clang. MyDeveloperDay requested review of this revision. https://bugs.llvm.org/show_bug.cgi?id=35514 Initializer lists with a try-block are

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2020-12-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Nit: Please just separate your test from old test Comment at: clang/unittests/Format/FormatTest.cpp:12158 "default:\n" + " break;\n" "}", HazardyKnusperkeks wrote: > MyDeveloperDay w

[PATCH] D93296: [clang-format] PR35514 brace-init member initializers in function-try-blocks are not formatted correctly

2020-12-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D93296#2457366 , @curdeius wrote: > I'd like to see a test with braces inside the try (intoducing scope), just to > verify it doesn't break. Sure let me add that. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D93296: [clang-format] PR35514 brace-init member initializers in function-try-blocks are not formatted correctly

2020-12-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 312407. MyDeveloperDay added a comment. Add additional unit test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93296/new/ https://reviews.llvm.org/D93296 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTest.c

[PATCH] D93296: [clang-format] PR35514 brace-init member initializers in function-try-blocks are not formatted correctly

2020-12-17 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb41c0b357d5: [clang-format] PR35514 brace-init member initializers in function-try-blocks… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D93459: Fix -Wno-error= parsing in clang-format.

2020-12-17 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/D93459/new/ https://reviews.llvm.org/D93459 _

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, curdeius, JakeMerdichAMD, JVApen. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. https://bugs.llvm.org/show_bug.cgi?id=48539 Add support for Qt Translator Comment

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2020-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: curdeius, krasimir, klimek, sammccall, benhamilton. MyDeveloperDay added projects: clang, clang-format. Herald added a subscriber: mgorny. MyDeveloperDay requested review of this revision. I find as I develop I'm moving between

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2020-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D93528#2462723 , @curdeius wrote: > Why not using clang-format's support for JavaScript? It seems more > complicated now, but it will probably allow to more easily change/add style > options. WDYT? > And what happens wh

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Maybe @JVApen can help as they logged https://bugs.llvm.org/show_bug.cgi?id=48539 I'm not a Qt developer so I can't really comment beyond fixing what was in the bug rpeort Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2020-12-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. > With my maintainer-of-`Support/JSON` hat on, I don't like the idea of these > features being shoehorned into the library to make clang-format an > incrementally more featureful JSON formatter. They're likely to

[PATCH] D87587: [clang-format][PR47290] Add MaxUnwrappedLinesForShortNamespace format option

2020-12-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. Thanks for making the changes, this LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87587/new/ https://reviews.llvm.org/D87587 __

[PATCH] D87587: [clang-format][PR47290] Add MaxUnwrappedLinesForShortNamespace format option

2020-12-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2463 +**MaxUnwrappedLinesForShortNamespace** (``unsigned``) + The maximal number of unwrapped lines that a short namespace spans. This is quite a mouthful before this land

[PATCH] D93626: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

2020-12-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: curdeius, krasimir, JakeMerdichAMD. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. https://bugs.llvm.org/show_bug.cgi?id=48535 using `SpaceAfterCStyleCast: true` size_t

[PATCH] D93626: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

2020-12-22 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:1976 + tok::kw_co_yield, tok::equal, tok::kw_delete, + tok::kw_sizeof, tok::kw_throw) ||

[PATCH] D93626: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

2020-12-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 313295. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. remove unrelated change CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93626/new/ https://reviews.llvm.org/D93626 Files: clang/lib/Format/TokenAnnotato

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 313297. MyDeveloperDay added a comment. remove //= and //~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93490/new/ https://reviews.llvm.org/D93490 Files: clang/lib/Format/BreakableToken.cpp clang/unittests/Format/FormatTestComments.cpp

[PATCH] D93626: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

2020-12-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D93626#2467745 , @curdeius wrote: > LGTM now. I tried to find other cases where this change may change the > behaviour but couldn't. Have you tried applying to some bigger repo and see > what you get? The best would be

[PATCH] D93633: [format] Add overload to parseConfiguration that accept llvm::MemoryBufferRef

2020-12-22 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/D93633/new/ https://reviews.llvm.org/D93633 _

[PATCH] D93758: [format][NFC] Use unsigned char as the base of all enums in FormatStyle

2020-12-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. We should probably check the docs/tools/dump_format_style.py still works Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93758/new/ https://reviews.llvm.org/D93758 ___ cfe-c

[PATCH] D93626: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

2020-12-23 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5426b2f9ed9f: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-23 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG031743cb5b3c: [clang-format] PR48539 ReflowComments breaks Qt translation comments (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D93758: [format][NFC] Use unsigned char as the base of all enums in FormatStyle

2020-12-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I don't have any major issues with this other than it makes Format.h a bit more ugly. (there are more ugly and harder to understand pieces of code than this change!) We'll only normally really have 1 of these in play at any one time, but it is passed around quit

[PATCH] D93806: [clang-format] PR48569 clang-format fails to align case label with `switch` with Whitesmith Indentation

2020-12-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, curdeius, JakeMerdichAMD, jbcoe. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. https://bugs.llvm.org/show_bug.cgi?id=48569 This is a tentative fix which addresse

[PATCH] D93806: [clang-format] PR48569 clang-format fails to align case label with `switch` with Whitesmith Indentation

2020-12-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This is the closest I could find thus far http://bitsavers.informatik.uni-stuttgart.de/pdf/chromatics/CGC_7900_C_Programmers_Manual_Mar82.pdf and the very few examples from the manual show the case is aligned with the switch F14838781: image.png

[PATCH] D93806: [clang-format] PR48569 clang-format fails to align case label with `switch` with Whitesmith Indentation

2020-12-26 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc7dcc4c72588: [clang-format] PR48569 clang-format fails to align case label with `switch`… (authored by MyDeveloperDay). Changed prior to commit: https://reviews.llvm.org/D93806?vs=313699&id=313746#toc

[PATCH] D90534: [clang-format] Add new option PenaltyIndentedWhitespace

2020-11-08 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/D90534/new/ https://reviews.llvm.org/D90534 _

[PATCH] D90780: [git-clang-format] Process CUDA header files

2020-11-14 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdb6f7e0e9ec2: [git-clang-format] Process CUDA header files (authored by MyDeveloperDay). Herald added a project: clang. Herald added a subscriber: cf

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

2020-11-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Can you rerun clang/docs/tools/dump_style.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91507/new/ https://reviews.llvm.org/D91507 ___ cfe-commits mailing list cfe-com

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

2020-11-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. make sure you build the other clang-extra tools (I'm not sure who else uses the lib/Tooling) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91507/new/ https://reviews.llvm.org/D91507

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I have noticed that clang-format has a tendency to over eagerly make * and & a TT_BinaryOperator, I know its too late to change it now, but sometimes I wonder if they should be detected as TT_PointerOrReference and then the clauses try and expose when they are be

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8365 + EXPECT_TOKEN(Tokens[11], tok::star, TT_PointerOrReference); + verifyFormat("#define lambda [](const decltype(x) *ptr) {}"); +} I like this style of test, I think some

[PATCH] D79388: [clang-format] Fix AlignConsecutive on PP blocks

2020-10-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Not to my knowledge, if we are not going to fix it we should probably revert it for now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79388/new/ https://reviews.llvm.org/D79388 _

[PATCH] D88227: [clang-format] Add a SpaceAroundPointerQualifiers style option

2020-10-14 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/D88227/new/ https://reviews.llvm.org/D88227 _

[PATCH] D89496: [Format/ObjC] Correctly handle base class with lightweight generics and protocol

2020-10-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89496/new/ https://reviews.llvm.org/D89496 ___ cfe-commits mailing list cfe-commi

[PATCH] D89464: Revert "[clang-format] Fix AlignConsecutive on PP blocks"

2020-10-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. LGTM, only keep the tests if they remain passing, otherwise perhaps @JakeMerdichAMD can add them back in. Could you add a test for the thing that broke to keep us honest? @JakeMerdichAMD when you get time, swing back round again with your fix because I think th

[PATCH] D91950: [clang-format] Add BreakBeforeInlineASMColon configuration

2020-11-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. 1. this needs a full context diff (diff -U 99) 2. this needs unit tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91950/new/ https://reviews.llvm.org/D91950 ___ c

[PATCH] D91949: [clang-format] Add BreakBeforeStructInitialization configuration

2020-11-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Could you make you patch with a full context diff, plus we really want unit tests for all changes if you change Format.h you need to regenerate the ClangFormatStyleOptions.rst by running dump_style.py in clang/docs/tools Repository: rG LLVM Github Monorepo C

[PATCH] D91996: [clang-format] Remove double trim

2020-11-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. Can you please clang format, but apart from that this looks fine Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91996/new/ https:

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

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

<    5   6   7   8   9   10   11   12   13   14   >