MCPcopy Create free account
hub / github.com/Samsung/UTopia / ASTNode

Class ASTNode

include/ftg/astirmap/ASTNode.h:13–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace ftg {
12
13class ASTNode {
14public:
15 enum nodeType { DECL, STMT, PARAM, CALL, CTORINIT };
16
17 ASTNode(nodeType Type, DynTypedNode Node, clang::ASTUnit &Unit);
18 const LocIndex &getIndex() const;
19 const DynTypedNode &getNode() const;
20 nodeType getNodeType() const;
21 size_t getOffset() const;
22 unsigned getLength() const;
23 const clang::QualType &getType() const;
24 clang::ASTUnit &getASTUnit() const;
25
26 friend llvm::raw_ostream &operator<<(llvm::raw_ostream &, const ASTNode &);
27
28private:
29 DynTypedNode Node;
30 LocIndex Index;
31 nodeType NodeType;
32 size_t Offset = 0;
33 size_t Length = 0;
34 clang::QualType Ty;
35 clang::ASTUnit &Unit;
36
37 clang::SourceLocation
38 getBeginLoc(const DynTypedNode &Node,
39 const clang::SourceManager &SrcManager) const;
40 clang::SourceLocation getEndLoc(const DynTypedNode &Node,
41 const clang::SourceLocation &BeginLoc,
42 const clang::SourceManager &SrcManager) const;
43 std::pair<unsigned, unsigned>
44 getLengthAndOffset(const DynTypedNode &Node,
45 const clang::SourceLocation &BeginLoc,
46 const clang::SourceManager &SrcManager) const;
47 clang::QualType getType(const DynTypedNode &Node) const;
48};
49
50} // namespace ftg
51

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected