[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 13 09:47:36 PDT 2021
MyDeveloperDay added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1388
break;
- if (!Line->Tokens.begin()->Tok->is(tok::kw_typedef) &&
- isC78ParameterDecl(FormatTok)) {
+ const FormatToken *Next = AllTokens[Tokens->getPosition() + 1];
+ if (Next && Next->isOneOf(tok::l_paren, tok::semi))
----------------
Maybe?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107961/new/
https://reviews.llvm.org/D107961
More information about the cfe-commits
mailing list