[PATCH] D39806: [clang-format] Support python-style comments in text protos

Benjamin Kramer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 07:38:04 PST 2017

bkramer added inline comments.

Comment at: lib/Format/BreakableToken.cpp:48
+  static const SmallVector<StringRef, 8> KnownTextProtoPrefixes{"//", "#"};
+  const SmallVectorImpl<StringRef> &KnownPrefixes =
+      (Style.Language == FormatStyle::LK_TextProto) ? KnownTextProtoPrefixes
These should stay arrays. You can use ArrayRef to get a convenient reference to them.


More information about the cfe-commits mailing list