Commit b5eb2157 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Minor

parent 404fa0ab
......@@ -169,19 +169,37 @@ class MyVisitor : public RecursiveASTVisitor<MyVisitor> {
private:
ASTContext *Context;
public:
explicit MyVisitor(ASTContext *Context) : Context(Context) {
}
virtual ~MyVisitor() {
struct RefState {
enum {
UNKNOWN,
BORROWED,
OWNED,
} type;
int num_refs;
};
struct BlockState {
DenseMap<void*, RefState> vars;
};
void handle(Stmt* stmt) {
assert(0);
}
void checkFunction(FunctionDecl* func) {
//dumper()->TraverseDecl(func);
errs() << "printing:\n";
func->print(errs());
errs() << "dumping:\n";
func->dump(errs());
BlockState state;
handle(func->getBody());
}
public:
explicit MyVisitor(ASTContext *Context) : Context(Context) {
}
virtual ~MyVisitor() {
}
virtual bool VisitFunctionDecl(FunctionDecl* func) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment