summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-06-21 18:20:01 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-06-21 18:20:01 +0000
commit3f31bd6dc0871cc7ece80e9621f607faeb92544e (patch)
treebab7a3c43292dc43e4b52011b2693913660fec70 /clang/lib/Sema/SemaDecl.cpp
parent3a73d9e067a314df779ad3ab8d42b5461b8cdadf (diff)
downloadbcm5719-llvm-3f31bd6dc0871cc7ece80e9621f607faeb92544e.tar.gz
bcm5719-llvm-3f31bd6dc0871cc7ece80e9621f607faeb92544e.zip
Sema: convert decl + while loop into for loop (NFC)
Convert a hand rolled for loop into an explicit for loop. NFC. llvm-svn: 240245
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index aa006b31fc8..df8e38ff668 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -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();
}
}
}
OpenPOWER on IntegriCloud