mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Requestify memberwise init synthesis
This commit adds two requests, one to compute whether or not a decl should have a memberwise initializer, and another to synthesize it.
This commit is contained in:
@@ -3464,6 +3464,13 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
/// Whether this declaration has a synthesized memberwise initializer.
|
||||
bool hasMemberwiseInitializer() const;
|
||||
|
||||
/// Retrieves the synthesized memberwise initializer for this declaration,
|
||||
/// or \c nullptr if it does not have one.
|
||||
ConstructorDecl *getMemberwiseInitializer() const;
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
static bool classof(const Decl *D) {
|
||||
return D->getKind() >= DeclKind::First_NominalTypeDecl &&
|
||||
|
||||
Reference in New Issue
Block a user