diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-08-21 16:06:57 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-08-21 16:06:57 +0000 |
commit | a302cd9a5e058123c3e00694f236e6f7087b6889 (patch) | |
tree | 96661faf0e938ed95e64d7723da748c85107f8de /clang/lib/AST/Expr.cpp | |
parent | 5e98ff967b23e84edf96513ac6e12213104b3148 (diff) | |
download | bcm5719-llvm-a302cd9a5e058123c3e00694f236e6f7087b6889.tar.gz bcm5719-llvm-a302cd9a5e058123c3e00694f236e6f7087b6889.zip |
Range'ify some for loops over RecordDecl::fields()
No functionality change.
llvm-svn: 216183
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index e1ebda245f2..523db1243d7 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -2734,10 +2734,9 @@ bool Expr::isConstantInitializer(ASTContext &Ctx, bool IsForRef, if (ILE->getType()->isRecordType()) { unsigned ElementNo = 0; RecordDecl *RD = ILE->getType()->getAs<RecordType>()->getDecl(); - for (RecordDecl::field_iterator Field = RD->field_begin(), - FieldEnd = RD->field_end(); Field != FieldEnd; ++Field) { + for (const auto *Field : RD->fields()) { // If this is a union, skip all the fields that aren't being initialized. - if (RD->isUnion() && ILE->getInitializedFieldInUnion() != *Field) + if (RD->isUnion() && ILE->getInitializedFieldInUnion() != Field) continue; // Don't emit anonymous bitfields, they just affect layout. |