clang
5.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
include
clang
Index
IndexDataConsumer.h
Go to the documentation of this file.
1
//===--- IndexDataConsumer.h - Abstract index data consumer ---------------===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#ifndef LLVM_CLANG_INDEX_INDEXDATACONSUMER_H
11
#define LLVM_CLANG_INDEX_INDEXDATACONSUMER_H
12
13
#include "
clang/Index/IndexSymbol.h
"
14
15
namespace
clang {
16
class
ASTContext;
17
class
DeclContext;
18
class
Expr;
19
class
FileID;
20
class
IdentifierInfo;
21
class
ImportDecl;
22
class
MacroInfo;
23
24
namespace
index {
25
26
class
IndexDataConsumer
{
27
public
:
28
struct
ASTNodeInfo
{
29
const
Expr
*
OrigE
;
30
const
Decl
*
OrigD
;
31
const
Decl
*
Parent
;
32
const
DeclContext
*
ContainerDC
;
33
};
34
35
virtual
~IndexDataConsumer
() {}
36
37
virtual
void
initialize
(
ASTContext
&Ctx) {}
38
39
/// \returns true to continue indexing, or false to abort.
40
virtual
bool
handleDeclOccurence
(
const
Decl
*D,
SymbolRoleSet
Roles,
41
ArrayRef<SymbolRelation>
Relations,
42
FileID
FID,
unsigned
Offset
,
43
ASTNodeInfo ASTNode);
44
45
/// \returns true to continue indexing, or false to abort.
46
virtual
bool
handleMacroOccurence
(
const
IdentifierInfo
*
Name
,
47
const
MacroInfo
*MI,
SymbolRoleSet
Roles,
48
FileID
FID,
unsigned
Offset
);
49
50
/// \returns true to continue indexing, or false to abort.
51
virtual
bool
handleModuleOccurence
(
const
ImportDecl
*ImportD,
52
SymbolRoleSet
Roles,
53
FileID
FID,
unsigned
Offset
);
54
55
virtual
void
finish
() {}
56
57
private
:
58
virtual
void
_anchor();
59
};
60
61
}
// namespace index
62
}
// namespace clang
63
64
#endif
clang::index::IndexDataConsumer::handleDeclOccurence
virtual bool handleDeclOccurence(const Decl *D, SymbolRoleSet Roles, ArrayRef< SymbolRelation > Relations, FileID FID, unsigned Offset, ASTNodeInfo ASTNode)
Definition:
IndexingAction.cpp:23
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition:
DeclBase.h:81
clang::index::IndexDataConsumer::~IndexDataConsumer
virtual ~IndexDataConsumer()
Definition:
IndexDataConsumer.h:35
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition:
IdentifierTable.h:56
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:128
unsigned
clang::index::IndexDataConsumer::ASTNodeInfo
Definition:
IndexDataConsumer.h:28
Offset
uint32_t Offset
Definition:
CacheTokens.cpp:43
clang::index::IndexDataConsumer
Definition:
IndexDataConsumer.h:26
llvm::ArrayRef
Definition:
LLVM.h:31
clang::index::IndexDataConsumer::ASTNodeInfo::OrigD
const Decl * OrigD
Definition:
IndexDataConsumer.h:30
clang::Expr
Expr - This represents one expression.
Definition:
Expr.h:105
clang::index::IndexDataConsumer::handleModuleOccurence
virtual bool handleModuleOccurence(const ImportDecl *ImportD, SymbolRoleSet Roles, FileID FID, unsigned Offset)
Definition:
IndexingAction.cpp:36
IndexSymbol.h
clang::index::IndexDataConsumer::initialize
virtual void initialize(ASTContext &Ctx)
Definition:
IndexDataConsumer.h:37
clang::index::IndexDataConsumer::ASTNodeInfo::Parent
const Decl * Parent
Definition:
IndexDataConsumer.h:31
clang::ImportDecl
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition:
Decl.h:3829
clang::FileID
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Definition:
SourceLocation.h:39
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition:
DeclBase.h:1215
Name
StringRef Name
Definition:
USRFinder.cpp:123
clang::MacroInfo
Encapsulates the data about a macro definition (e.g.
Definition:
MacroInfo.h:34
clang::index::IndexDataConsumer::finish
virtual void finish()
Definition:
IndexDataConsumer.h:55
clang::index::IndexDataConsumer::handleMacroOccurence
virtual bool handleMacroOccurence(const IdentifierInfo *Name, const MacroInfo *MI, SymbolRoleSet Roles, FileID FID, unsigned Offset)
Definition:
IndexingAction.cpp:30
clang::index::IndexDataConsumer::ASTNodeInfo::ContainerDC
const DeclContext * ContainerDC
Definition:
IndexDataConsumer.h:32
clang::index::IndexDataConsumer::ASTNodeInfo::OrigE
const Expr * OrigE
Definition:
IndexDataConsumer.h:29
Generated on Tue Sep 5 2017 11:45:12 for clang by
1.8.6