Sema: convert decl + while loop into for loop (NFC)

Convert a hand rolled for loop into an explicit for loop.  NFC.

llvm-svn: 240245
This commit is contained in:
Saleem Abdulrasool 2015-06-21 18:20:01 +00:00
parent 3a73d9e067
commit 3f31bd6dc0
1 changed files with 2 additions and 3 deletions

View File

@ -3808,15 +3808,14 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
TypeSpecType == DeclSpec::TST_interface ||
TypeSpecType == DeclSpec::TST_union ||
TypeSpecType == DeclSpec::TST_enum) {
AttributeList* attrs = DS.getAttributes().getList();
while (attrs) {
for (AttributeList* attrs = DS.getAttributes().getList(); attrs;
attrs = attrs->getNext()) {
Diag(attrs->getLoc(), diag::warn_declspec_attribute_ignored)
<< attrs->getName()
<< (TypeSpecType == DeclSpec::TST_class ? 0 :
TypeSpecType == DeclSpec::TST_struct ? 1 :
TypeSpecType == DeclSpec::TST_union ? 2 :
TypeSpecType == DeclSpec::TST_interface ? 3 : 4);
attrs = attrs->getNext();
}
}
}