[PATCH] D120902: [clang-format] Fix assertion failure/crash with `AllowShortFunctionsOnASingleLine: Inline/InlineOnly`.

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 4 01:10:36 PST 2022


owenpan added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:313
               break;
+          if ((*J)->Level == TheLine->Level)
+            return false;
----------------
curdeius wrote:
> owenpan wrote:
> > To be safe?
> Good idea. Will do.
> Any idea how to provoke this (if at all possible)?
I can't think of a valid C++ example that would trigger this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120902



More information about the cfe-commits mailing list