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 {
1092
1092
static PathLifetimeKind
1093
1093
shouldLifetimeExtendThroughPath (const IndirectLocalPath &Path) {
1094
1094
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)
1098
1097
continue ;
1099
- if (Elem.Kind != IndirectLocalPathEntry::LambdaCaptureInit)
1100
- return PathLifetimeKind::NoExtend;
1098
+ return Elem.Kind == IndirectLocalPathEntry::DefaultInit
1099
+ ? PathLifetimeKind::Extend
1100
+ : PathLifetimeKind::NoExtend;
1101
1101
}
1102
1102
return PathLifetimeKind::Extend;
1103
1103
}
You can’t perform that action at this time.
0 commit comments