[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2267 + return true; +if (Right.is(tok::l_paren) && Left.is(tok::kw_co_await) && +Left.Previous && Left.Previous->is(tok::kw_operator)) EricWF wrote: > djasper wrote: > > I

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added a comment. @alexfh Thanks for correcting the reviewers. I had no idea who to add so I used something like `git-suggest-reviewers`. Comment at: lib/Format/Format.cpp:1958 LangOpts.DeclSpecKeyword = 1; // To get

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 106135. EricWF marked an inline comment as done. EricWF added a comment. - Address most review comments except those about `spaceBreakBetween` and `spaceBreakBefore`. https://reviews.llvm.org/D34225 Files: lib/Format/Format.cpp

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1958 LangOpts.DeclSpecKeyword = 1; // To get __declspec. + LangOpts.CoroutinesTS = 1; return LangOpts; Can we change this only if Style.isCpp()? We should probably do that for other things,

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good to me too, but I actually don't know this code. Leaving to Daniel! https://reviews.llvm.org/D34225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. This looks good overall, btw. But please wait for Krasimir or Daniel, since they actually know this code ;] https://reviews.llvm.org/D34225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Leaving only the most likely reviewers for this code. https://reviews.llvm.org/D34225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-06-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:433 case tok::kw___try: + assert(!Tok->is(tok::kw_co_await)); if (!LBraceStack.empty() && LBraceStack.back()->BlockKind == BK_Unknown) This change is accidental.

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-06-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: klimek. This patch (1) enable parsing for coroutines by default and (2) teaches clang-format how to properly handle them. https://reviews.llvm.org/D34225 Files: lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp