aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-06 07:17:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-06 07:17:58 +0000
commit4f3b8f8ac2f8c89028a2f8793df0a7887df809d4 (patch)
tree817f79029a48b35164b9b82e1a3d4b313c33a16e /lib/AST/DeclBase.cpp
parentd62fdc448b3ace606c8c9c9f13e43218fa204dbf (diff)
Minor tweaks to the transparent declcontext patch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 59d8a07bfd..a21d5db11a 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -513,7 +513,8 @@ void DeclContext::addDecl(ASTContext &Context, ScopedDecl *D, bool AllowLookup)
/// transparent contexts nested within it).
void DeclContext::buildLookup(ASTContext &Context, DeclContext *DCtx) {
for (; DCtx; DCtx = DCtx->getNextContext()) {
- for (decl_iterator D = DCtx->decls_begin(); D != DCtx->decls_end(); ++D) {
+ for (decl_iterator D = DCtx->decls_begin(), DEnd = DCtx->decls_end();
+ D != DEnd; ++D) {
// Insert this declaration into the lookup structure
insertImpl(*D);