[PATCH] D63062: [clang-format] Added New Style Rule: BitFieldDeclarationsOnePerLine

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 14:49:54 PDT 2019


MyDeveloperDay added inline comments.


================
Comment at: lib/Format/FormatToken.h:524
+    T = T->getPreviousNonComment();
+    return (T->Tok.is(tok::comma) && Tok.is(tok::identifier) &&
+            T->Next->Tok.is(tok::colon));
----------------
do you think you might need

(T && T->Tok.is(tok::comma)......



================
Comment at: lib/Format/TokenAnnotator.cpp:2920
+  if (Right.Previous->is(tok::comma) && Style.BitFieldDeclarationsOnePerLine &&
+      Right.is(tok::identifier) && (Right.Next->is(tok::colon)))
+    return true;
----------------
can't this use Right.isBitField()


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63062/new/

https://reviews.llvm.org/D63062





More information about the cfe-commits mailing list