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
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
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
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,
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
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
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
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.
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