[PATCH] D129064: [clang-format] Avoid crash in LevelIndentTracker.

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 5 12:35:19 PDT 2022


HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:62-70
     while (IndentForLevel.size() <= Line.Level)
       IndentForLevel.push_back(-1);
     if (Line.InPPDirective) {
       unsigned IndentWidth =
           (Style.PPIndentWidth >= 0) ? Style.PPIndentWidth : Style.IndentWidth;
       Indent = Line.Level * IndentWidth + AdditionalIndent;
     } else {
----------------
So how about that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129064



More information about the cfe-commits mailing list