@@ -3009,14 +3009,7 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
3009
3009
}
3010
3010
3011
3011
case DeclAttrKind::CDecl: {
3012
- if (!AttrName.starts_with (" _" ) &&
3013
-
3014
- // Backwards support for @cdecl("stringId"). Remove before enabling in
3015
- // production so we accept only the identifier format.
3016
- lookahead<bool >(1 , [&](CancellableBacktrackingScope &) {
3017
- return Tok.isNot (tok::string_literal);
3018
- })) {
3019
-
3012
+ if (!AttrName.starts_with (" _" )) {
3020
3013
std::optional<StringRef> CName;
3021
3014
if (consumeIfAttributeLParen ()) {
3022
3015
// Custom C name.
@@ -3127,10 +3120,9 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
3127
3120
Attributes.add (new (Context) SILGenNameAttr (AsmName.value (), Raw, AtLoc,
3128
3121
AttrRange, /* Implicit=*/ false ));
3129
3122
else if (DK == DeclAttrKind::CDecl) {
3130
- bool underscored = AttrName.starts_with (" _" );
3131
3123
Attributes.add (new (Context) CDeclAttr (AsmName.value (), AtLoc,
3132
3124
AttrRange, /* Implicit=*/ false ,
3133
- /* isUnderscored*/ underscored ));
3125
+ /* isUnderscored*/ true ));
3134
3126
} else if (DK == DeclAttrKind::Expose) {
3135
3127
for (auto *EA : Attributes.getAttributes <ExposeAttr>()) {
3136
3128
// A single declaration cannot have two @_exported attributes with
0 commit comments