summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-20 04:04:17 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-20 04:04:17 +0000
commitd42b0a4dc97fd0b5bfb0552559a1eeff1c39f050 (patch)
tree2c24e4c7abefe12ff86c5f653ba94057c372bade
parent313e3015749210a1b4f3e5573dc7ad5949362aaa (diff)
downloadbcm5719-llvm-d42b0a4dc97fd0b5bfb0552559a1eeff1c39f050.tar.gz
bcm5719-llvm-d42b0a4dc97fd0b5bfb0552559a1eeff1c39f050.zip
Fix Decl::NextDeclInScope access issue
llvm-svn: 62567
-rw-r--r--clang/include/clang/AST/DeclBase.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index 20b0126bd75..35f929c12f7 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -457,6 +457,8 @@ class DeclContext {
/// DenseMap. Othewise, it is an array.
bool isLookupMap() const { return LookupPtr.getInt() == LookupIsMap; }
+ static Decl *getNextDeclInScope(Decl *D) { return D->NextDeclInScope; }
+
protected:
DeclContext(Decl::Kind K)
: DeclKind(K), LookupPtr(), FirstDecl(0), LastDecl(0) { }
@@ -809,7 +811,7 @@ inline bool Decl::isDefinedOutsideFunctionOrMethod() const {
}
inline DeclContext::decl_iterator& DeclContext::decl_iterator::operator++() {
- Current = Current->NextDeclInScope;
+ Current = getNextDeclInScope(Current);
return *this;
}
OpenPOWER on IntegriCloud