mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Parse unknown attributes as "custom" attributes.
Parse custom attributes with the grammar: ``` '@' type-identifier expr-paren? ```
This commit is contained in:
@@ -2407,6 +2407,15 @@ void Serializer::writeDeclAttribute(const DeclAttribute *DA) {
|
||||
addDeclRef(theAttr->getReplacedFunction()), pieces.size(), pieces);
|
||||
return;
|
||||
}
|
||||
|
||||
case DAK_Custom: {
|
||||
auto abbrCode = DeclTypeAbbrCodes[CustomDeclAttrLayout::Code];
|
||||
auto theAttr = cast<CustomAttr>(DA);
|
||||
CustomDeclAttrLayout::emitRecord(
|
||||
Out, ScratchRecord, abbrCode, theAttr->isImplicit(),
|
||||
addTypeRef(theAttr->getTypeLoc().getType()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user