[PATCH] D51036: clang-format: Fix formatting C++ namespaces with preceding 'inline' or 'export' specifier
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 24 02:37:45 PDT 2018
owenpan added inline comments.
================
Comment at: lib/Format/Format.cpp:1312
auto &Line = *AnnotatedLines[i];
if (Line.startsWith(tok::kw_namespace) ||
+ Line.startsWith(tok::kw_inline, tok::kw_namespace) ||
----------------
sammccall wrote:
> these 3 startswith checks appear 4 times now, you could pull out a helper function `startsWithNamespace` in FormatToken.h or something like that.
> Up to you.
I missed it. Good catch!
Repository:
rC Clang
https://reviews.llvm.org/D51036
More information about the cfe-commits
mailing list