[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts
Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 4 20:30:24 PDT 2020
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 <typename T>
concept bool EqualityComparable = requires(T a, T b) {
{ a == b } -> bool;
};
But this is what I get:
template <typename T>
concept bool EqualityComparable = requires(T a, T b)
{
{
a == b
} -> bool;
};
Perhaps it's because I compiled against commit `71d88cebfb42c8c5ac2d54b42afdcca956e55660` (Fri Jul 3 13:46:41 2020 -0400).
Next:
template <std::semiregular F, std::semiregular... Args>
requires std::invocable<F, std::invoke_result_t<Args>...>
struct [[nodiscard]] constant : std::bool_constant < requires
{
typename _require_constant_<(std::invoke(F{}, Args{}()...), 0)>;
} > {};
There's spaces around the template brackets. The lack of indentation is also odd, considering that in this context things are indented.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79773/new/
https://reviews.llvm.org/D79773
More information about the cfe-commits
mailing list