File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1092,12 +1092,12 @@ enum PathLifetimeKind {
10921092static PathLifetimeKind
10931093shouldLifetimeExtendThroughPath (const IndirectLocalPath &Path) {
10941094 for (auto Elem : Path) {
1095- if (Elem.Kind == IndirectLocalPathEntry::DefaultInit)
1096- return PathLifetimeKind::Extend;
1097- if (Elem.Kind == IndirectLocalPathEntry::MemberExpr)
1095+ if (Elem.Kind == IndirectLocalPathEntry::MemberExpr ||
1096+ Elem.Kind == IndirectLocalPathEntry::LambdaCaptureInit)
10981097 continue ;
1099- if (Elem.Kind != IndirectLocalPathEntry::LambdaCaptureInit)
1100- return PathLifetimeKind::NoExtend;
1098+ return Elem.Kind == IndirectLocalPathEntry::DefaultInit
1099+ ? PathLifetimeKind::Extend
1100+ : PathLifetimeKind::NoExtend;
11011101 }
11021102 return PathLifetimeKind::Extend;
11031103}
You can’t perform that action at this time.
0 commit comments