[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
Tue Aug 21 13:15:16 PDT 2018


owenpan added inline comments.


================
Comment at: lib/Format/NamespaceEndCommentsFixer.cpp:129-130
+  // Detect "(inline|export)? namespace" in the beginning of a line.
+  if (NamespaceTok->is(tok::kw_inline) || NamespaceTok->is(tok::kw_export))
     NamespaceTok = NamespaceTok->getNextNonComment();
   if (!NamespaceTok || NamespaceTok->isNot(tok::kw_namespace))
----------------
owenpan wrote:
> ```
>   if (NamespaceTok && NamespaceTok->isOneOf(tok::kw_inline, tok::kw_export))
> ```
Actually, I meant it for line 129 only.


Repository:
  rC Clang

https://reviews.llvm.org/D51036





More information about the cfe-commits mailing list