[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:13:19 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?


I'm not sure that would work, the <8> is part of the type not the TT_StartOfName, or did I miss something

  M=0 C=0 T=Unknown S=1 B=0 BK=0 P=0 Name=int L=3 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5ddd090 Text='int'
  M=1 C=1 T=FunctionDeclarationName S=1 B=0 BK=0 P=220 Name=identifier L=88 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5dda5a0 Text='Test'
  M=0 C=0 T=Unknown S=0 B=0 BK=0 P=23 Name=l_paren L=89 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='('
  M=0 C=1 T=Unknown S=0 B=0 BK=0 P=140 Name=identifier L=90 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5dda510 Text='A'
  M=0 C=1 T=StartOfName S=1 B=0 BK=0 P=240 Name=identifier L=92 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5dda540 Text='a'
  M=0 C=0 T=Unknown S=0 B=0 BK=0 P=43 Name=r_paren L=93 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=')



  M=0 C=0 T=Unknown S=1 B=0 BK=0 P=0 Name=int L=3 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5ddd090 Text='int'
  M=1 C=1 T=FunctionDeclarationName S=1 B=0 BK=0 P=220 Name=identifier L=88 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5dda4e0 Text='TestFn'
  M=0 C=0 T=Unknown S=0 B=0 BK=0 P=23 Name=l_paren L=89 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='('
  M=0 C=1 T=Unknown S=0 B=0 BK=0 P=140 Name=identifier L=90 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5dda510 Text='A'
  M=0 C=0 T=TemplateOpener S=0 B=0 BK=0 P=50 Name=less L=91 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='<'
  M=0 C=1 T=Unknown S=0 B=0 BK=0 P=380 Name=bool L=95 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5ddd670 Text='bool'
  M=0 C=0 T=TemplateCloser S=0 B=0 BK=0 P=290 Name=greater L=96 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='>'
  M=0 C=1 T=StartOfName S=1 B=0 BK=0 P=240 Name=identifier L=98 PPK=2 FakeLParens= FakeRParens=0 II=0x263a5dda540 Text='a'
  M=0 C=0 T=Unknown S=0 B=0 BK=0 P=43 Name=r_paren L=99 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=')'


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59309/new/

https://reviews.llvm.org/D59309





More information about the llvm-commits mailing list