[clang] 29d8535 - [clang-format][NFC] TokenAnnotator: Use range based for
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 5 03:32:19 PST 2022
Author: Björn Schäpers
Date: 2022-01-05T12:31:35+01:00
New Revision: 29d8535e2b86d27a3c1363646f04ddf1835c30d2
URL: https://github.com/llvm/llvm-project/commit/29d8535e2b86d27a3c1363646f04ddf1835c30d2
DIFF: https://github.com/llvm/llvm-project/commit/29d8535e2b86d27a3c1363646f04ddf1835c30d2.diff
LOG: [clang-format][NFC] TokenAnnotator: Use range based for
Differential Revision: https://reviews.llvm.org/D116560
Added:
Modified:
clang/lib/Format/TokenAnnotator.cpp
Removed:
################################################################################
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 3cd89127348c..b501c4d37d40 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -2550,11 +2550,8 @@ bool TokenAnnotator::mustBreakForReturnType(const AnnotatedLine &Line) const {
}
void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) {
- for (SmallVectorImpl<AnnotatedLine *>::iterator I = Line.Children.begin(),
- E = Line.Children.end();
- I != E; ++I) {
- calculateFormattingInformation(**I);
- }
+ for (AnnotatedLine *ChildLine : Line.Children)
+ calculateFormattingInformation(*ChildLine);
Line.First->TotalLength =
Line.First->IsMultiline ? Style.ColumnLimit
More information about the cfe-commits
mailing list