[all-commits] [llvm/llvm-project] e4aa14: [clang-format] Refactoring and asserts in LevelInd...
Sedenion via All-commits
all-commits at lists.llvm.org
Tue Jul 18 13:32:24 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e4aa1428a28dce38cd4712b5720baa333cbdd25b
https://github.com/llvm/llvm-project/commit/e4aa1428a28dce38cd4712b5720baa333cbdd25b
Author: Sedenion <39583823+Sedeniono at users.noreply.github.com>
Date: 2023-07-18 (Tue, 18 Jul 2023)
Changed paths:
M clang/lib/Format/UnwrappedLineFormatter.cpp
Log Message:
-----------
[clang-format] Refactoring and asserts in LevelIndentTracker. (NFC)
adjustToUnmodifiedLine: The code does something only for non-PP-directives.
This is now reflected by putting the if-check to the top. This also ensures
that the assert() there is executed only if IndentForLevel is actually
accessed.
getIndent(): assert valid index into IndentForLevel.
Added explanation regarding the intention of IndentForLevel.
Differential Revision: https://reviews.llvm.org/D155094
More information about the All-commits
mailing list