[PATCH] D116314: [clang-format] Add style to separate definition blocks

ksyx via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 30 16:04:48 PST 2021


ksyx added inline comments.


================
Comment at: clang/include/clang/Format/Format.h:4097
+                                               ArrayRef<tooling::Range> Ranges,
+                                               StringRef FileName = "<stdin>");
+
----------------
HazardyKnusperkeks wrote:
> The only use of this function I found is in the tests and it sets the argument, or am I mistaken?
I suppose this function might also be called from some users of the library other than clangfmt itself? Besides, the declarations nearby are setting this default value.


================
Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:35
+    return;
+  auto likelyDefinition = [this](AnnotatedLine *Line) {
+    if (Line->MightBeFunctionDecl && Line->mightBeFunctionDefinition())
----------------
HazardyKnusperkeks wrote:
> 
[[ https://github.com/llvm/llvm-project/blob/298367ee6e36eeb1b193ad9fa92082c2ef2345a3/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp#L2393 | Some other lambdas ]] I found use lowercased leading letter, as it looks like a function (call).


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

https://reviews.llvm.org/D116314



More information about the cfe-commits mailing list