File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -6598,14 +6598,6 @@ bool VarDecl::isMemberwiseInitialized(bool preferDeclaredProperties) const {
65986598 return true ;
65996599}
66006600
6601- bool VarDecl::isTypeWrapperLocalStorageForInitializer () const {
6602- if (auto *ctor =
6603- dyn_cast_or_null<ConstructorDecl>(getDeclContext ()->getAsDecl ())) {
6604- return this == ctor->getLocalTypeWrapperStorageVar ();
6605- }
6606- return false ;
6607- }
6608-
66096601bool VarDecl::isLet () const {
66106602 // An awful hack that stabilizes the value of 'isLet' for ParamDecl instances.
66116603 //
@@ -8890,14 +8882,6 @@ bool ConstructorDecl::isObjCZeroParameterWithLongSelector() const {
88908882 return params->get (0 )->getInterfaceType ()->isVoid ();
88918883}
88928884
8893- VarDecl *ConstructorDecl::getLocalTypeWrapperStorageVar () const {
8894- auto &ctx = getASTContext ();
8895- auto *mutableSelf = const_cast <ConstructorDecl *>(this );
8896- return evaluateOrDefault (
8897- ctx.evaluator , SynthesizeLocalVariableForTypeWrapperStorage{mutableSelf},
8898- nullptr );
8899- }
8900-
89018885DestructorDecl::DestructorDecl (SourceLoc DestructorLoc, DeclContext *Parent)
89028886 : AbstractFunctionDecl(DeclKind::Destructor, Parent,
89038887 DeclBaseName::createDestructor (), DestructorLoc,
Original file line number Diff line number Diff line change @@ -27,6 +27,22 @@ NominalTypeDecl *NominalTypeDecl::getTypeWrapper() const {
2727 GetTypeWrapper{mutableSelf}, nullptr );
2828}
2929
30+ VarDecl *ConstructorDecl::getLocalTypeWrapperStorageVar () const {
31+ auto &ctx = getASTContext ();
32+ auto *mutableSelf = const_cast <ConstructorDecl *>(this );
33+ return evaluateOrDefault (
34+ ctx.evaluator , SynthesizeLocalVariableForTypeWrapperStorage{mutableSelf},
35+ nullptr );
36+ }
37+
38+ bool VarDecl::isTypeWrapperLocalStorageForInitializer () const {
39+ if (auto *ctor =
40+ dyn_cast_or_null<ConstructorDecl>(getDeclContext ()->getAsDecl ())) {
41+ return this == ctor->getLocalTypeWrapperStorageVar ();
42+ }
43+ return false ;
44+ }
45+
3046bool UsesTypeWrapperFeature::evaluate (Evaluator &evaluator,
3147 NominalTypeDecl *decl) const {
3248 // This is a type wrapper type.
You can’t perform that action at this time.
0 commit comments