Skip to content

Commit 671dd73

Browse files
committed
Refactor
1 parent 05c0095 commit 671dd73

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

clang/lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4993,20 +4993,8 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA,
49934993
"late field attribute expects to have at most one declaration.");
49944994

49954995
// Dispatch based on the attribute and parse it
4996-
const AttributeCommonInfo::Form ParsedForm = ParsedAttr::Form::GNU();
4997-
IdentifierInfo *ScopeName = nullptr;
4998-
const ParsedAttr::Kind AttrKind =
4999-
ParsedAttr::getParsedKind(&LA.AttrName, /*ScopeName=*/ScopeName,
5000-
/*SyntaxUsed=*/ParsedForm.getSyntax());
5001-
switch (AttrKind) {
5002-
case ParsedAttr::Kind::AT_CountedBy:
5003-
ParseBoundsAttribute(LA.AttrName, LA.AttrNameLoc, Attrs,
5004-
/*ScopeName=*/ScopeName, SourceLocation(),
5005-
/*Form=*/ParsedForm);
5006-
break;
5007-
default:
5008-
llvm_unreachable("Unhandled late parsed attribute");
5009-
}
4996+
ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, nullptr, nullptr,
4997+
SourceLocation(), ParsedAttr::Form::GNU(), nullptr);
50104998

50114999
for (auto *D : LA.Decls)
50125000
Actions.ActOnFinishDelayedAttribute(getCurScope(), D, Attrs);

0 commit comments

Comments
 (0)