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

2020-07-01 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. In D79773#2125040 , @MyDeveloperDay wrote: > Just so I'm clear for this and your Allman coment would you show me what you > are seeing and what you expect to see? just so I understand. Sure, thank you. This is what I have, as

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

2020-07-01 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Using parameter packs within non-parenthesized requires-clauses results in weird formatting: template requires std::invocable < F, std::invoke_result_t ... > struct constant; vs template requires(std::invocable...>) struct constant; CHANGES SIN

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

2020-07-04 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP requested changes to this revision. JohelEGP added a comment. This revision now requires changes to proceed. Thank you. Everything I reported works fine now. I have two more cases for now. First are your examples in the OP. You have template concept bool EqualityComparable = requir

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

2020-07-05 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Another weird formatting when direct-initializing a variable with a non-parenthesized requires-expression: constexpr void test_width() { bool invalid_rep{!requires {typename jge::width; } } ; } vs constexpr void test_width() { bool invalid_

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

2020-07-06 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Yes, it's valid C++ (is my hope). It's from WIP code, which I made available to show you: https://github.com/johelegp/jge. Here it is building, running and passing the tests: https://travis-ci.com/github/johelegp/jge/jobs/358137355#L559. Here are links to the above li

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

2020-07-08 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Ah, that makes sense. The very definition of Allman is to always break before braces. I suppose I'll need to use `BreakBeforeBraces: Custom` and `BraceWrapping:`. I did some testing and noticed that the weird format comes with any of these: BreakBeforeBraces: Custom

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

2020-06-25 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP requested changes to this revision. JohelEGP added a comment. This revision now requires changes to proceed. `BreakBeforeBraces: Allman` isn't respected. template friend constexpr auto operator*(const size2d& l, const units::quantity& r) noexcept( noexcept(l.w* r)) requires(

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

2020-06-30 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. constexpr plane(const plane& other) noexcept( (detail::default_allocator_is_nothrow && std::is_nothrow_copy_constructible_v)) requires(std::copyable) : plane{to1d(other), other.sz.w} { } Without the parentheses in trailing requires-clauses, all cod

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

2020-08-10 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. I found another case. See how everything after the //requires-clause// is indented for constructors with just the constructor's name (it works otherwise, maybe because it looks like a function). class [[nodiscard]] data_t { public: template requi

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

2020-08-13 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. In D79773#2141164 , @MyDeveloperDay wrote: > This is actually failing in the handling of parsing the `<>` in > (`parseAngle()` actually `parseBrace()` inside of that), it is not really > concepts specific except it may be seen

[PATCH] D119893: [clang-format] Fixed handling of requires clauses followed by attributes

2022-02-16 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP accepted this revision. JohelEGP added a comment. This revision is now accepted and ready to land. Thank you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119893/new/ https://reviews.llvm.org/D119893 ___ cfe-commits mailing list cfe

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

2020-12-04 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. I was a bit late, but thanks for everything! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 ___ cfe-commits mailing list cfe-commits@li

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

2020-12-04 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Yes, here's my reply: https://bugs.llvm.org/show_bug.cgi?id=47161#c2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 ___ cfe-commits ma

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

2020-10-20 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Could you do a rebase? The patch no longer applies: error: patch failed: clang/docs/ClangFormatStyleOptions.rst:2711 error: clang/docs/ClangFormatStyleOptions.rst: patch does not apply error: patch failed: clang/docs/ReleaseNotes.rst:398 error: clang/docs/Release

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-19 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP requested changes to this revision. JohelEGP added inline comments. This revision now requires changes to proceed. Comment at: clang/docs/CPlusPlus20Modules.rst:290 +``primary module interface unit`` by ``-fmodule-file`` +since the langugae specification says a module im

[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl

2022-10-01 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. I can confirm that, with this patch, Clang successfully compiles my actual code base. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134874/new/ https://reviews.llvm.org/D134874 ___ cfe-commits mailing list cfe-commi

[PATCH] D120806: [clang-format] Recognize "if consteval".

2022-03-02 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. In D120806#3354119 , @MyDeveloperDay wrote: > LFTM > > Do we also need to consider this in the context of "AllowShortIfStatments"? > (that would be in a different review in my view) Definitely. Since it didn't work at all, I

[PATCH] D120806: [clang-format] Recognize "if consteval".

2022-03-02 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP accepted this revision. JohelEGP added a comment. My few cases format consistently with the condition case: diff diff --git a/tests/integration/test.waarudo.io.dynamic.cpp b/tests/integration/test.waarudo.io.dynamic.cpp index be5a626..e1265b9 100644 --- a/tests/integration/test.

[PATCH] D116007: [clang-format] Fix BreakBeforeBraces: Attach ignored with trailing requires-expression of function.

2021-12-20 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Thank you for doing this. With the patch, I get this diff: diff diff --git a/sources/details/waarudo.details.utilities.cpp b/sources/details/waarudo.details.utilities.cpp index 0b3680e..6e234ac 100644 --- a/sources/details/waarudo.details.utilities.cpp +++ b/

[PATCH] D93839: [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates

2020-12-27 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP accepted this revision. JohelEGP added a comment. This revision is now accepted and ready to land. Thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93839/new/ https://reviews.llvm.org/D93839 ___

[PATCH] D93839: [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates

2020-12-27 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. I have another case: `.clang-format`: BraceWrapping: AfterStruct: true SplitEmptyRecord: true BreakBeforeBraces: Custom Input and expected formatted output: template struct rep> { using type = T; }; Actual formatted output: template struct r