aboutsummaryrefslogtreecommitdiff
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
commit0cba85577ae613bce5768f3089003629a46b0e7f (patch)
treeb3669fe13d514a4c5fd3c0e811429f2ed9dadfba
parentfce72bc19c775b71edc21a2a710a9d7f02251aa6 (diff)
Fix Decl::NextDeclInScope access issue
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62567 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclBase.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 20b0126bd7..35f929c12f 100644
--- a/include/clang/AST/DeclBase.h
+++ b/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;
}