aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-26 22:04:51 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-26 22:04:51 +0000
commit2ea054fbc59ed19b8e3304e7e7cbdd56a5a5120f (patch)
treee80b34a4dada54a2f7f25e3f715f4876991889a0 /include
parentee99c8191cc0d9778d733da51be2f52c7b732d76 (diff)
Teach the ASTReader how to avoid cycles when loading declarations that
are lexically within a particular DeclContext. Test forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/DeclBase.h6
-rw-r--r--include/clang/Lex/ModuleLoader.h0
2 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 042c50f2a8..8dc15de0f8 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -1322,6 +1322,12 @@ public:
ExternalVisibleStorage = ES;
}
+ /// \brief Determine whether the given declaration is stored in the list of
+ /// declarations lexically within this context.
+ bool isDeclInLexicalTraversal(const Decl *D) const {
+ return D && (D->NextDeclInContext || D == FirstDecl || D == LastDecl);
+ }
+
static bool classof(const Decl *D);
static bool classof(const DeclContext *D) { return true; }
#define DECL(NAME, BASE)
diff --git a/include/clang/Lex/ModuleLoader.h b/include/clang/Lex/ModuleLoader.h
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/include/clang/Lex/ModuleLoader.h