File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -130,20 +130,15 @@ class CyclicDependencyCallbacks : public PPCallbacks {
130
130
<< FileName;
131
131
132
132
const bool IsIncludePathValid =
133
- std::all_of (Files.rbegin (), It, [](const Include &Elem) {
133
+ std::all_of (Files.rbegin (), It + 1 , [](const Include &Elem) {
134
134
return !Elem.Name .empty () && Elem.Loc .isValid ();
135
135
});
136
-
137
136
if (!IsIncludePathValid)
138
137
return ;
139
138
140
- auto CurrentIt = Files.rbegin ();
141
- do {
142
- if (CurrentIt->Loc .isValid ())
143
- Check.diag (CurrentIt->Loc , " '%0' included from here" ,
144
- DiagnosticIDs::Note)
145
- << CurrentIt->Name ;
146
- } while (CurrentIt++ != It);
139
+ for (const Include &I : llvm::make_range (Files.rbegin (), It + 1 ))
140
+ Check.diag (I.Loc , " '%0' included from here" , DiagnosticIDs::Note)
141
+ << I.Name ;
147
142
}
148
143
149
144
bool isFileIgnored (StringRef FileName) const {
You can’t perform that action at this time.
0 commit comments