[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 07:17:47 PDT 2020


arichardson created this revision.
arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius.
Herald added subscribers: cfe-commits, jfb.
Herald added a project: clang.
arichardson requested review of this revision.

This change also comma-separated identifiers inside parentheses as a
possible function declaration.

When using the always break after return type setting:
Before:
SomeType funcdecl(SomeType);
SomeType funcdecl(SomeType, OtherType);

After:
SomeType
funcdecl(SomeType);
SomeType
funcdecl(SomeType, OtherType);

Depends on D87007 <https://reviews.llvm.org/D87007> (to apply cleanly)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87028

Files:
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87028.289441.patch
Type: text/x-patch
Size: 4847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200902/772e1205/attachment.bin>


More information about the cfe-commits mailing list