1 #ifndef ROSE_AST_Defect_H
2 #define ROSE_AST_Defect_H
43 static std::set<self_t *>
all;
46 template <
Kind k,
typename... Args>
54 template <
typename DefectT,
typename... Args>
55 static DefectT
const &
record(Args... args) {
56 return record<DefectT::__kind>(args...);
65 static void display(std::ostream & out);
67 virtual void print(std::ostream & out)
const = 0;
114 virtual void print(std::ostream & out)
const;
117 using IntegrityEdgeDefect = Defects::defect_t<Defects::Kind::integrity_edges>;
std::string label
Label of this edge in the grammar.
VariantT expected
The expected variant for target (like V_SgExpression)
The generic defect descriptor.
@ integrity_declarations
Declarations integrity:
SgNode * target
Pointer to the target node of the edge. Either the pointer or the node are invalid.
Kind
List of the supported kind of defects. Kind::any.
@ integrity_edges
Edges integrity: for any node in the memory pool, check that all edges point to valid nodes.
@ integrity_types
Types integrity:
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...
@ any
base kind for any defect
SgNode * source
Pointer to the source node of the edge (always a valid pointer and node)
@ integrity_symbols
Symbols integrity:
Defect descriptor specialization for the default kind "any".
static const defect_t< k > & record(Args... args)
Call new for the specific kind of defect, forwards all argument to the constructor....
This class represents the base class for all IR nodes within Sage III.
static std::set< self_t * > all
Set of all defects.
Main namespace for the ROSE library.
bool container
If the edge have multiplicity (like a node with a std::vector<SgExpression*>)
Specialization of the defect_t template for the case of an edge integrity defect.
static const DefectT & record(Args... args)
Call new for the specific defect type, forwards all argument to the constructor (requires the special...