Skip to content

Commit e832062

Browse files
committed
Refactor
1 parent 2db755b commit e832062

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
@@ -4995,20 +4995,8 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA,
49954995
"late field attribute expects to have at most one declaration.");
49964996

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

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

0 commit comments

Comments
 (0)