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 {
6598
6598
return true ;
6599
6599
}
6600
6600
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
-
6609
6601
bool VarDecl::isLet () const {
6610
6602
// An awful hack that stabilizes the value of 'isLet' for ParamDecl instances.
6611
6603
//
@@ -8890,14 +8882,6 @@ bool ConstructorDecl::isObjCZeroParameterWithLongSelector() const {
8890
8882
return params->get (0 )->getInterfaceType ()->isVoid ();
8891
8883
}
8892
8884
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
-
8901
8885
DestructorDecl::DestructorDecl (SourceLoc DestructorLoc, DeclContext *Parent)
8902
8886
: AbstractFunctionDecl(DeclKind::Destructor, Parent,
8903
8887
DeclBaseName::createDestructor (), DestructorLoc,
Original file line number Diff line number Diff line change @@ -27,6 +27,22 @@ NominalTypeDecl *NominalTypeDecl::getTypeWrapper() const {
27
27
GetTypeWrapper{mutableSelf}, nullptr );
28
28
}
29
29
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
+
30
46
bool UsesTypeWrapperFeature::evaluate (Evaluator &evaluator,
31
47
NominalTypeDecl *decl) const {
32
48
// This is a type wrapper type.
You can’t perform that action at this time.
0 commit comments