@@ -2989,14 +2989,7 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
2989
2989
}
2990
2990
2991
2991
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 (" _" )) {
3000
2993
std::optional<StringRef> CName;
3001
2994
if (consumeIfAttributeLParen ()) {
3002
2995
// Custom C name.
@@ -3107,10 +3100,9 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
3107
3100
Attributes.add (new (Context) SILGenNameAttr (AsmName.value (), Raw, AtLoc,
3108
3101
AttrRange, /* Implicit=*/ false ));
3109
3102
else if (DK == DeclAttrKind::CDecl) {
3110
- bool underscored = AttrName.starts_with (" _" );
3111
3103
Attributes.add (new (Context) CDeclAttr (AsmName.value (), AtLoc,
3112
3104
AttrRange, /* Implicit=*/ false ,
3113
- /* isUnderscored*/ underscored ));
3105
+ /* isUnderscored*/ true ));
3114
3106
} else if (DK == DeclAttrKind::Expose) {
3115
3107
for (auto *EA : Attributes.getAttributes <ExposeAttr>()) {
3116
3108
// A single declaration cannot have two @_exported attributes with
0 commit comments