File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -2221,21 +2221,10 @@ namespace {
2221
2221
MD->overwriteAccess (AccessLevel::Private);
2222
2222
} else if (cxxOperatorKind ==
2223
2223
clang::OverloadedOperatorKind::OO_PlusPlus) {
2224
- // Make sure the type is not an immortal foreign reference type.
2224
+ // Make sure the type is not a foreign reference type.
2225
2225
// We cannot handle `operator++` for those types, since the
2226
2226
// current implementation creates a new instance of the type.
2227
- bool isImmortal = false ;
2228
- if (auto classDecl = dyn_cast<ClassDecl>(result)) {
2229
- auto retainOperation = evaluateOrDefault (
2230
- Impl.SwiftContext .evaluator ,
2231
- CustomRefCountingOperation (
2232
- {classDecl, CustomRefCountingOperationKind::retain}),
2233
- {});
2234
- isImmortal = retainOperation.kind ==
2235
- CustomRefCountingOperationResult::immortal;
2236
- }
2237
-
2238
- if (cxxMethod->param_empty () && !isImmortal) {
2227
+ if (cxxMethod->param_empty () && !isa<ClassDecl>(result)) {
2239
2228
// This is a pre-increment operator. We synthesize a
2240
2229
// non-mutating function called `successor() -> Self`.
2241
2230
FuncDecl *successorFunc = synthesizer.makeSuccessorFunc (MD);
You can’t perform that action at this time.
0 commit comments