FindArgument.h 684 Bytes
Newer Older
Anirudh Kaushik's avatar
Anirudh Kaushik committed
1
#ifndef _FIND_ARGUMENT_
Anirudh's avatar
Anirudh committed
2
#define _FIND_ARGUMENT_
Anirudh Kaushik's avatar
Anirudh Kaushik committed
3
4
5
6
7
8
9
10
11
12
13
14

#include "clang/AST/DeclCXX.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/AST/RecursiveASTVisitor.h"

namespace scpar {
	using namespace clang;
	using namespace std;

	class FindArgument:public RecursiveASTVisitor < FindArgument > {

	public:
rmrf's avatar
rmrf committed
15
		FindArgument( Expr * );
16
17
18
19
20
    virtual ~FindArgument();
		virtual bool VisitMemberExpr (MemberExpr * me);
		virtual bool VisitDeclRefExpr (DeclRefExpr * de);
		virtual bool VisitIntegerLiteral (IntegerLiteral * il);
		virtual bool VisitCXXBoolLiteralExpr (CXXBoolLiteralExpr * bl);
Anirudh Kaushik's avatar
Anirudh Kaushik committed
21

rmrf's avatar
rmrf committed
22
		string getArgumentName();
Anirudh Kaushik's avatar
Anirudh Kaushik committed
23
	private:
rmrf's avatar
rmrf committed
24
25
	  Expr * expression_;
		string argument_name_;
Anirudh Kaushik's avatar
Anirudh Kaushik committed
26
27
28
	};
}
#endif