retdec
break_outside_loop_validator.h
Go to the documentation of this file.
1 
8 #ifndef RETDEC_LLVMIR2HLL_VALIDATOR_VALIDATORS_BREAK_OUTSIDE_LOOP_VALIDATOR_H
9 #define RETDEC_LLVMIR2HLL_VALIDATOR_VALIDATORS_BREAK_OUTSIDE_LOOP_VALIDATOR_H
10 
11 #include <string>
12 
15 
16 namespace retdec {
17 namespace llvmir2hll {
18 
30 public:
31  virtual std::string getId() const override;
32 
33  static ShPtr<Validator> create();
34 
35 private:
37 
41  virtual void visit(ShPtr<BreakStmt> stmt) override;
42  virtual void visit(ShPtr<ContinueStmt> stmt) override;
44 };
45 
46 } // namespace llvmir2hll
47 } // namespace retdec
48 
49 #endif
A validator which checks that no break or continue statement appears where it should not appear.
Definition: break_outside_loop_validator.h:29
virtual std::string getId() const override
Definition: break_outside_loop_validator.cpp:29
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
static ShPtr< Validator > create()
Creates a new validator.
Definition: break_outside_loop_validator.cpp:25
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
A base class for all validators.
Definition: validator.h:35
Validator()
Constructs a new validator.
Definition: validator.cpp:20
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.
A base class for all validators.