1 #ifndef C_DEFINITION_FINDER_H_INCLUDED_
2 #define C_DEFINITION_FINDER_H_INCLUDED_
56 static SgFunctionDeclaration *
main_;
58 static SgTypedefDeclaration *
file_;
70 for(std::vector<SgNode*>::const_iterator
71 iter = func_decls.begin();
72 iter != func_decls.end();
75 SgFunctionDeclaration *func_decl = isSgFunctionDeclaration(*iter);
76 std::string qualified_name = func_decl->get_qualified_name();
78 if(qualified_name ==
"::printf") {
83 if(qualified_name ==
"::fprintf") {
97 for(std::vector<SgNode*>::const_iterator
98 iter = typedef_decls.begin();
99 iter != typedef_decls.end();
102 SgTypedefDeclaration *typedef_decl = isSgTypedefDeclaration(*iter);
103 std::string qualified_name = typedef_decl->get_qualified_name();
105 if(qualified_name ==
"::std::string") {
110 if(qualified_name ==
"::FILE") {
111 file_ = typedef_decl;
117 std::cout <<
"main_ " <<
main_ << std::endl;
118 std::cout <<
"printf_ " <<
printf_ << std::endl;
119 std::cout <<
"fprintf_ " <<
fprintf_ << std::endl;
120 std::cout <<
"file_ " <<
file_ << std::endl;
121 std::cout <<
"std_string_ " <<
std_string_ << std::endl;