[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-06 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG76ec6b1ef69f: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted (authored by MyDeveloperDay). Changed prior to commit: https://reviews.llvm.org/D69577?vs=227952=228008#toc

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-05 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. Build result: pass - 59867 tests passed, 0 failed and 768 were skipped. Log files: console-log.txt , CMakeCache.txt

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Just a small typo in comment. Otherwise, great job! Comment at: clang/lib/Format/TokenAnnotator.cpp:1369 + static bool isDeductionGuide(FormatToken ) { +//

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 227952. MyDeveloperDay marked an inline comment as done. MyDeveloperDay set the repository for this revision to rG LLVM Github Monorepo. MyDeveloperDay added a comment. Ensure the deduction guides follow a template Add additional test cases raised

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:4995 + verifyFormat("c()->f();"); + verifyFormat("x()->foo<1>;"); + verifyFormat("x = p->foo<3>();"); MyDeveloperDay wrote: > curdeius wrote: > > What about: > > > > ``` > >

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:4995 + verifyFormat("c()->f();"); + verifyFormat("x()->foo<1>;"); + verifyFormat("x = p->foo<3>();"); curdeius wrote: >

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-11-04 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Minor comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1354 + static FormatToken *untilMatchingParen(FormatToken *Current) { +// for when MatchingParen is not yet established +int ParenLevel = 0; Please write

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 227317. MyDeveloperDay marked 4 inline comments as done. MyDeveloperDay added a comment. Add additional test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69577/new/ https://reviews.llvm.org/D69577 Files:

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1371 +if (Current.Previous && Current.Previous->is(tok::r_paren) && +Current.startsSequence(tok::arrow, tok::identifier, tok::less)) { + // Find the TemplateCloser.

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-31 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. The functionality looks acceptable. Trying to parse the whole thing still looks fragile to me. I expect code owner to take a look at this change. Comment at: clang/lib/Format/TokenAnnotator.cpp:1371 +if (Current.Previous &&

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 227241. MyDeveloperDay marked an inline comment as done. MyDeveloperDay set the repository for this revision to rC Clang. MyDeveloperDay added a comment. Address review comments, deduction guides with embedded parens Repository: rC Clang CHANGES

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1354 + static bool isDeductionGuide(FormatToken ) { +// Look for a deduction guide A()...) -> A<...>; +if (Current.Previous && Current.Previous->is(tok::r_paren) &&

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 227166. MyDeveloperDay added a comment. move detection of deduction guides into a function, add additional negative tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69577/new/ https://reviews.llvm.org/D69577 Files:

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 4 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1400-1403 +} else if (Current.Previous && Current.Previous->is(tok::r_paren) && + Current.startsSequence(tok::arrow,

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1400-1403 +} else if (Current.Previous && Current.Previous->is(tok::r_paren) && + Current.startsSequence(tok::arrow, tok::identifier, tok::less)) { + // Deduction guides

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Sorry ignore my last results, let me rerun, I was using the revision without the change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69577/new/ https://reviews.llvm.org/D69577 ___ cfe-commits mailing list

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a subscriber: hans. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1400-1403 +} else if (Current.Previous && Current.Previous->is(tok::r_paren) && +

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1400 Current.Type = TT_TrailingReturnArrow; +} else if (Current.Previous && Current.Previous->is(tok::r_paren) && + Current.startsSequence(tok::arrow, tok::identifier,

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1400-1403 +} else if (Current.Previous && Current.Previous->is(tok::r_paren) && + Current.startsSequence(tok::arrow, tok::identifier, tok::less)) { + // Deduction guides

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 227062. MyDeveloperDay added a reviewer: lichray. MyDeveloperDay added a comment. Detect deduction guides arrow as a TrailingReturn arrow, allowing use of existing space before/after rules CHANGES SINCE LAST ACTION

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D69577#1726587 , @lichray wrote: > Should we find a way to set `->`'s type to `TT_TrailingReturnArrow`? that's possible then we might be able to use the existing spaces before rule if

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. Should we find a way to set `->`'s type to `TT_TrailingReturnArrow`? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69577/new/ https://reviews.llvm.org/D69577 ___ cfe-commits mailing list

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, mitchell-stellar, owenpan, sammccall. MyDeveloperDay added projects: clang-format, clang-tools-extra. Herald added a project: clang. see https://bugs.llvm.org/show_bug.cgi?id=35518 clang-format removes spaces around