[PATCH] D155094: Refactoring and asserts in LevelIndentTracker. (NFC)
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 12 13:50:08 PDT 2023
owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:91
void adjustToUnmodifiedLine(const AnnotatedLine &Line) {
- unsigned LevelIndent = Line.First->OriginalColumn;
- if (static_cast<int>(LevelIndent) - Offset >= 0)
- LevelIndent -= Offset;
- assert(Line.Level < IndentForLevel.size());
- if ((!Line.First->is(tok::comment) || IndentForLevel[Line.Level] == -1) &&
- !Line.InPPDirective) {
- IndentForLevel[Line.Level] = LevelIndent;
+ if (!Line.InPPDirective) {
+ unsigned LevelIndent = Line.First->OriginalColumn;
----------------
Early return.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155094/new/
https://reviews.llvm.org/D155094
More information about the cfe-commits
mailing list