File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
clang/lib/Analysis/FlowSensitive Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,12 @@ class TerminatorVisitor
103
103
return {nullptr , false };
104
104
}
105
105
106
- TerminatorVisitorRetTy VisitCXXForRangeStmt (const CXXForRangeStmt *) {
107
- // Don't do anything special for CXXForRangeStmt, because the condition
108
- // (being implicitly generated) isn't visible from the loop body.
106
+ TerminatorVisitorRetTy VisitCXXForRangeStmt (const CXXForRangeStmt *S) {
107
+ // Even though the condition isn't visible from the loop body, analysis
108
+ // might depend on the implicit implicit statements implied by the loop.
109
+ auto *Cond = S->getCond ();
110
+ if (Cond != nullptr )
111
+ return extendFlowCondition (*Cond);
109
112
return {nullptr , false };
110
113
}
111
114
You can’t perform that action at this time.
0 commit comments