aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/ASTUnit.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-03 02:20:32 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-03 02:20:32 +0000
commitdfb332d0081c6641d1dbae6a2aeff757c99cc740 (patch)
tree6c7b45c894999ae07bb0f5892a281882f42892e3 /include/clang/Frontend/ASTUnit.h
parentdcaca015a2f08e03a6d86222fec2e83e04f6b848 (diff)
[libclang] Add infrastructure to be able to only deserialize decls in a file region and
use it for clang_getCursor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r--include/clang/Frontend/ASTUnit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index cbd293f72e..26828a4427 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -519,6 +519,12 @@ public:
/// \brief Add a new local file-level declaration.
void addFileLevelDecl(Decl *D);
+ /// \brief Get the decls that are contained in a file in the Offset/Length
+ /// range. \arg Length can be 0 to indicate a point at \arg Offset instead of
+ /// a range.
+ void findFileRegionDecls(FileID File, unsigned Offset, unsigned Length,
+ SmallVectorImpl<Decl *> &Decls);
+
/// \brief Add a new top-level declaration, identified by its ID in
/// the precompiled preamble.
void addTopLevelDeclFromPreamble(serialization::DeclID D) {