File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -5714,6 +5714,11 @@ class VarDecl : public AbstractStorageDecl {
5714
5714
// / backing property will be treated as the member-initialized property.
5715
5715
bool isMemberwiseInitialized (bool preferDeclaredProperties) const ;
5716
5716
5717
+ // / Check whether this variable presents a local storage synthesized
5718
+ // / by the compiler in a user-defined designated initializer to
5719
+ // / support initialization of type wrapper managed properties.
5720
+ bool isTypeWrapperLocalStorageForInitializer () const ;
5721
+
5717
5722
// / Return the range of semantics attributes attached to this VarDecl.
5718
5723
auto getSemanticsAttrs () const
5719
5724
-> decltype(getAttrs().getAttributes<SemanticsAttr>()) {
Original file line number Diff line number Diff line change @@ -6504,6 +6504,14 @@ bool VarDecl::isMemberwiseInitialized(bool preferDeclaredProperties) const {
6504
6504
return true ;
6505
6505
}
6506
6506
6507
+ bool VarDecl::isTypeWrapperLocalStorageForInitializer () const {
6508
+ if (auto *ctor =
6509
+ dyn_cast_or_null<ConstructorDecl>(getDeclContext ()->getAsDecl ())) {
6510
+ return this == ctor->getLocalTypeWrapperStorageVar ();
6511
+ }
6512
+ return false ;
6513
+ }
6514
+
6507
6515
bool VarDecl::isLet () const {
6508
6516
// An awful hack that stabilizes the value of 'isLet' for ParamDecl instances.
6509
6517
//
You can’t perform that action at this time.
0 commit comments