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 @@ -1108,12 +1108,12 @@ enum PathLifetimeKind {
11081108static PathLifetimeKind
11091109shouldLifetimeExtendThroughPath (const IndirectLocalPath &Path) {
11101110 for (auto Elem : Path) {
1111- if (Elem.Kind == IndirectLocalPathEntry::DefaultInit)
1112- return PathLifetimeKind::Extend;
1113- if (Elem.Kind == IndirectLocalPathEntry::MemberExpr)
1111+ if (Elem.Kind == IndirectLocalPathEntry::MemberExpr ||
1112+ Elem.Kind == IndirectLocalPathEntry::LambdaCaptureInit)
11141113 continue ;
1115- if (Elem.Kind != IndirectLocalPathEntry::LambdaCaptureInit)
1116- return PathLifetimeKind::NoExtend;
1114+ return Elem.Kind == IndirectLocalPathEntry::DefaultInit
1115+ ? PathLifetimeKind::Extend
1116+ : PathLifetimeKind::NoExtend;
11171117 }
11181118 return PathLifetimeKind::Extend;
11191119}
You can’t perform that action at this time.
0 commit comments