@@ -2989,14 +2989,7 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
29892989 }
29902990
29912991 case DeclAttrKind::CDecl: {
2992- if (!AttrName.starts_with (" _" ) &&
2993-
2994- // Backwards support for @cdecl("stringId"). Remove before enabling in
2995- // production so we accept only the identifier format.
2996- lookahead<bool >(1 , [&](CancellableBacktrackingScope &) {
2997- return Tok.isNot (tok::string_literal);
2998- })) {
2999-
2992+ if (!AttrName.starts_with (" _" )) {
30002993 std::optional<StringRef> CName;
30012994 if (consumeIfAttributeLParen ()) {
30022995 // Custom C name.
@@ -3107,10 +3100,9 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
31073100 Attributes.add (new (Context) SILGenNameAttr (AsmName.value (), Raw, AtLoc,
31083101 AttrRange, /* Implicit=*/ false ));
31093102 else if (DK == DeclAttrKind::CDecl) {
3110- bool underscored = AttrName.starts_with (" _" );
31113103 Attributes.add (new (Context) CDeclAttr (AsmName.value (), AtLoc,
31123104 AttrRange, /* Implicit=*/ false ,
3113- /* isUnderscored*/ underscored ));
3105+ /* isUnderscored*/ true ));
31143106 } else if (DK == DeclAttrKind::Expose) {
31153107 for (auto *EA : Attributes.getAttributes <ExposeAttr>()) {
31163108 // A single declaration cannot have two @_exported attributes with
0 commit comments