aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}