[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357837: [clang-format] BreakAfterReturnType ignored on functions with numeric template… (authored by paulhoad, committed by ). Herald added a project: LLVM. Changed prior to commit:

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Comment at: clang/lib/Format/TokenAnnotator.cpp:3177-3178 return false; // Don't split tagged template literal so there is a break between the tag //

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. friendly ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59309/new/ https://reviews.llvm.org/D59309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3177-3178 return false; // Don't split tagged template literal so there is a break between the tag // identifier and template

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Minus me understanding the TT_TemplateString change, the rest looks nice now, thanks! Comment at: clang/lib/Format/TokenAnnotator.cpp:3177-3178 return false; // Don't split tagged template literal so there is a break between the tag //

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 191536. MyDeveloperDay added a comment. Sorry for the spam: - write this a little better CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59309/new/ https://reviews.llvm.org/D59309 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 191530. MyDeveloperDay added a comment. Addressing code review comment @klimek I think is what you meant, a much smaller and neater version of what I had before. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59309/new/

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Yea, the a b(c) problem is the olden C++ problem clang-format will never be able to solve, thus all these crazy heuristics. So, inching closer to understanding this - I totally missed the isLiteral() that short-circuits out before. I'm more happy with your current

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D59309#1428970 , @klimek wrote: > In D59309#1428969 , @MyDeveloperDay > wrote: > > > That works because the argument list is just tok::identifier and > > TT_StartOfName > > >

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D59309#1428970 , @klimek wrote: > In D59309#1428969 , @MyDeveloperDay > wrote: > > > That works because the argument list is just tok::identifier and > > TT_StartOfName > > >

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. of course, this isn't legal int TestFn(A=1) { return a; } and, would see the TT_StartOfName for (a) and would break int TestFn(A a = 1) { return a; } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59309/new/

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D59309#1428969 , @MyDeveloperDay wrote: > That works because the argument list is just tok::identifier and > TT_StartOfName Should we fix isStartOfName then? In A or A<8> A should be TT_StartOfName, too, right? CHANGES

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. That works because the argument list is just tok::identifier and TT_StartOfName so if we see StartOfName we are going to return true identifier will simply be skipped round the loop `` int Test(A a) {} AnnotatedTokens(L=0): M=0 C=0 T=Unknown S=1 B=0 BK=0

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D59309#1428807 , @MyDeveloperDay wrote: > In D59309#1428799 , @klimek wrote: > > > Why did the numeric constant break this? Which path would the function run > > through? > > > as its

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D59309#1428799 , @klimek wrote: > Why did the numeric constant break this? Which path would the function run > through? as its looking though the parameter list is doesn't recognize a numeric constant as being a

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Why did the numeric constant break this? Which path would the function run through? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59309/new/ https://reviews.llvm.org/D59309 ___ cfe-commits mailing list

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-03-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: djasper, klimek, JonasToth, krasimir, reuk. MyDeveloperDay added a project: clang-tools-extra. Addresses PR40696 - https://bugs.llvm.org/show_bug.cgi?id=40696 The BreakAfterReturnType didn't work if it had a single arguments