[PATCH] D129064: [clang-format] Avoid crash in LevelIndentTracker.
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 5 14:21:05 PDT 2022
owenpan 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 {
----------------
HazardyKnusperkeks wrote:
> So how about that?
Good idea, but it's an unrelated change. Let's take care of it in D129105, which I will update to use `resize()` instead of `insert()`.
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