@@ -5377,7 +5377,7 @@ ParserStatus Parser::parseDeclModifierList(DeclAttributes &Attributes,
5377
5377
// or witness something static.
5378
5378
if (isStartOfSwiftDecl() || (isa<ClassDecl>(CurDeclContext) &&
5379
5379
(Tok.is(tok::code_complete) ||
5380
- Tok.getRawText().equals( "override") ))) {
5380
+ Tok.getRawText() == "override"))) {
5381
5381
/* We're OK */
5382
5382
} else {
5383
5383
// This 'class' is a real ClassDecl introducer.
@@ -5536,13 +5536,13 @@ ParserStatus Parser::ParsedTypeAttributeList::slowParse(Parser &P) {
5536
5536
if (Tok.is(tok::kw_inout)) {
5537
5537
Specifier = ParamDecl::Specifier::InOut;
5538
5538
} else if (Tok.is(tok::identifier)) {
5539
- if (Tok.getRawText().equals( "__shared") ) {
5539
+ if (Tok.getRawText() == "__shared") {
5540
5540
Specifier = ParamDecl::Specifier::LegacyShared;
5541
- } else if (Tok.getRawText().equals( "__owned") ) {
5541
+ } else if (Tok.getRawText() == "__owned") {
5542
5542
Specifier = ParamDecl::Specifier::LegacyOwned;
5543
- } else if (Tok.getRawText().equals( "borrowing") ) {
5543
+ } else if (Tok.getRawText() == "borrowing") {
5544
5544
Specifier = ParamDecl::Specifier::Borrowing;
5545
- } else if (Tok.getRawText().equals( "consuming") ) {
5545
+ } else if (Tok.getRawText() == "consuming") {
5546
5546
Specifier = ParamDecl::Specifier::Consuming;
5547
5547
}
5548
5548
}
@@ -5859,7 +5859,7 @@ bool Parser::isStartOfSwiftDecl(bool allowPoundIfAttributes,
5859
5859
// The protocol keyword needs more checking to reject "protocol<Int>".
5860
5860
if (Tok.is(tok::kw_protocol)) {
5861
5861
const Token &Tok2 = peekToken();
5862
- return !Tok2.isAnyOperator() || ! Tok2.getText().equals( "<") ;
5862
+ return !Tok2.isAnyOperator() || Tok2.getText() != "<";
5863
5863
}
5864
5864
5865
5865
// The 'try' case is only for simple local recovery, so we only bother to
@@ -10139,7 +10139,7 @@ Parser::parseDeclOperator(ParseDeclOptions Flags, DeclAttributes &Attributes) {
10139
10139
10140
10140
const auto maybeDiagnoseInvalidCharInOperatorName = [this](const Token &Tk) {
10141
10141
if (Tk.is(tok::identifier)) {
10142
- if (Tk.getText().equals( "$") ||
10142
+ if (Tk.getText() == "$" ||
10143
10143
!DeclAttribute::getAttrKindFromString(Tk.getText())) {
10144
10144
diagnose(Tk, diag::identifier_within_operator_name, Tk.getText());
10145
10145
return true;
0 commit comments