mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[all-+0] Add a new convention for setters: DefaultSetterConventions.
In a situation where normal arguments are +0, we want setters to still take normal parameters at +1 since in most cases setters will be taking a parameter that is being forwarded into to be store into a field. Since this doesn't actually change the current ParameterConvention for setter normal arguments, this is NFC. rdar://34222540
This commit is contained in:
@@ -484,6 +484,12 @@ FuncDecl *SILDeclRef::getFuncDecl() const {
|
||||
return dyn_cast<FuncDecl>(getDecl());
|
||||
}
|
||||
|
||||
bool SILDeclRef::isSetter() const {
|
||||
if (!hasFuncDecl())
|
||||
return false;
|
||||
return getFuncDecl()->isSetter();
|
||||
}
|
||||
|
||||
AbstractFunctionDecl *SILDeclRef::getAbstractFunctionDecl() const {
|
||||
return dyn_cast<AbstractFunctionDecl>(getDecl());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user