Skip to content

Commit 3bb2da0

Browse files
committed
[IDE] Remove unnecessary code complete checks
1 parent ab6ad40 commit 3bb2da0

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,11 +2504,6 @@ static std::optional<Identifier> parseSingleAttrOptionImpl(
25042504
return std::nullopt;
25052505
}
25062506

2507-
if (P.Tok.is(tok::code_complete)) {
2508-
Status.setHasCodeCompletion();
2509-
codeCompletionCallback();
2510-
}
2511-
25122507
if (!P.consumeIf(tok::r_paren)) {
25132508
Status.setIsParseError();
25142509
P.diagnose(Loc, diag::attr_expected_rparen, AttrName, isDeclModifier);
@@ -2926,20 +2921,7 @@ ParserStatus Parser::parseNewDeclAttribute(DeclAttributes &Attributes,
29262921
consumeToken();
29272922
} else {
29282923
diagnose(Loc, diag::attr_access_expected_set, AttrName);
2929-
2930-
const Token &Tok2 = peekToken();
2931-
2932-
if (Tok2.is(tok::code_complete) && Tok.is(tok::identifier) &&
2933-
!Tok.isContextualDeclKeyword()) {
2934-
consumeToken(tok::identifier);
2935-
if (CodeCompletionCallbacks) {
2936-
CodeCompletionCallbacks->completeDeclAttrParam(
2937-
ParameterizedDeclAttributeKind::AccessControl, 0, false);
2938-
}
2939-
consumeToken(tok::code_complete);
2940-
return makeParserCodeCompletionStatus();
2941-
}
2942-
2924+
29432925
// Minimal recovery: if there's a single token and then an r_paren,
29442926
// consume them both. If there's just an r_paren, consume that.
29452927
if (!consumeIf(tok::r_paren)) {

0 commit comments

Comments
 (0)