projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
918c977
)
[clang-format][NFC] TokenAnnotator: Use range based for
author
Björn Schäpers
<bjoern@hazardy.de>
Sun, 2 Jan 2022 21:12:46 +0000
(22:12 +0100)
committer
Björn Schäpers
<bjoern@hazardy.de>
Wed, 5 Jan 2022 11:31:35 +0000
(12:31 +0100)
Differential Revision: https://reviews.llvm.org/D116560
clang/lib/Format/TokenAnnotator.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Format/TokenAnnotator.cpp
b/clang/lib/Format/TokenAnnotator.cpp
index
3cd8912
..
b501c4d
100644
(file)
--- 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