1#ifndef ROSE_AST_Defect_H
2#define ROSE_AST_Defect_H
56 static std::set<self_t *>
all;
59 template <
Kind k,
typename... Args>
67 template <
typename DefectT,
typename... Args>
68 static DefectT
const &
record(Args... args) {
69 return record<DefectT::__kind>(args...);
78 static void display(std::ostream & out);
80 virtual void print(std::ostream & out)
const = 0;
134 virtual void print(std::ostream & out)
const;
137using IntegrityEdgeDefect = Defects::defect_t<Defects::Kind::integrity_edges>;
This class represents the base class for all IR nodes within Sage III.
Kind
List of the supported kind of defects. Kind::any.
@ any
base kind for any defect
@ integrity_symbols
Symbols integrity:
@ integrity_declarations
Declarations integrity:
@ integrity_edges
Edges integrity: for any node in the memory pool, check that all edges point to valid nodes.
@ integrity_types
Types integrity:
Defect descriptor specialization for the default kind "any".
static std::set< self_t * > all
Set of all defects.
static DefectT const & record(Args... args)
Call new for the specific defect type, forwards all argument to the constructor (requires the special...
static void clear()
Delete all stored defect and clear the container.
static defect_t< k > const & record(Args... args)
Call new for the specific kind of defect, forwards all argument to the constructor....
bool container
If the edge have multiplicity (like a node with a std::vector<SgExpression*>)
SgNode * source
Pointer to the source node of the edge (always a valid pointer and node)
VariantT found
The actual variant of target if the pointer is valid (obtained by finding the pointer in the memory p...
bool traversed
Traversed edges forms the structure of the AST while the other one represent relations like types and...
SgNode * target
Pointer to the target node of the edge. Either the pointer or the node are invalid.
std::string label
Label of this edge in the grammar.
VariantT expected
The expected variant for target (like V_SgExpression)
The generic defect descriptor.