[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters
MyDeveloperDay via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 05:07:41 PDT 2019
MyDeveloperDay added a comment.
In D59309#1428970 <https://reviews.llvm.org/D59309#1428970>, @klimek wrote:
> In D59309#1428969 <https://reviews.llvm.org/D59309#1428969>, @MyDeveloperDay wrote:
>
> > That works because the argument list is just tok::identifier and TT_StartOfName
>
>
> Should we fix isStartOfName then?
>
> In A<bool> or A<8> A should be TT_StartOfName, too, right?
Maybe that is a better way, let me look..
I've realized that defining a function Test which returns a class, and has an unnamed class parameter in its definition
B Test(A);
is indistinguishable from a variable declaration Test of type B which passes a variable A into its constructor, without knowing that A is a class and not a variable, there isn't enough information to say this is a function or not
B Test(A);
Which is why we should always name our parameters in function declarations ;-)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59309/new/
https://reviews.llvm.org/D59309
More information about the llvm-commits
mailing list