HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:25
+    FormatTokenLexer &Tokens) {
+  if (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Leave)
+    return {{}, 0};
----------------
ksyx wrote:
> HazardyKnusperkeks wrote:
> > Better, but I still think we should have the assert here. The class should 
> > not be instantiated at all, if you don't want to use it.
> My idea is that it would be too redundant to have every user of this method 
> to check style once before it calls it?
Who are the users? `clang-format` and maybe its tests. And the only one that 
really matters is `clang-format`, which does the check.


================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:45
+
+  static void verifyFormat(llvm::StringRef Code,
+                           const FormatStyle &Style = getLLVMStyle(),
----------------
Maybe one should either use the normal reformat function, or additionally. 
Because right now we do not test any interferences of these two functions.


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

https://reviews.llvm.org/D116314

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to