forked from OSchip/llvm-project
[Sema] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71529
This commit is contained in:
parent
385339034f
commit
3ec6128dae
|
@ -1174,7 +1174,7 @@ namespace {
|
||||||
// We analyze lambda bodies separately. Skip them here.
|
// We analyze lambda bodies separately. Skip them here.
|
||||||
bool TraverseLambdaExpr(LambdaExpr *LE) {
|
bool TraverseLambdaExpr(LambdaExpr *LE) {
|
||||||
// Traverse the captures, but not the body.
|
// Traverse the captures, but not the body.
|
||||||
for (const auto &C : zip(LE->captures(), LE->capture_inits()))
|
for (const auto C : zip(LE->captures(), LE->capture_inits()))
|
||||||
TraverseLambdaCapture(LE, &std::get<0>(C), std::get<1>(C));
|
TraverseLambdaCapture(LE, &std::get<0>(C), std::get<1>(C));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1309,7 +1309,7 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext,
|
||||||
/// Motivating case is const_iterator begin() const vs iterator begin().
|
/// Motivating case is const_iterator begin() const vs iterator begin().
|
||||||
auto &OverloadSet = OverloadMap[std::make_pair(
|
auto &OverloadSet = OverloadMap[std::make_pair(
|
||||||
CurContext, Method->getDeclName().getAsOpaqueInteger())];
|
CurContext, Method->getDeclName().getAsOpaqueInteger())];
|
||||||
for (const DeclIndexPair& Entry : OverloadSet) {
|
for (const DeclIndexPair Entry : OverloadSet) {
|
||||||
Result &Incumbent = Results[Entry.second];
|
Result &Incumbent = Results[Entry.second];
|
||||||
switch (compareOverloads(*Method,
|
switch (compareOverloads(*Method,
|
||||||
*cast<CXXMethodDecl>(Incumbent.Declaration),
|
*cast<CXXMethodDecl>(Incumbent.Declaration),
|
||||||
|
|
Loading…
Reference in New Issue