27 return llvm::make_unique<MyASTConsumer>(CI);
31 const std::vector<std::string> &args) {
32 for (
unsigned i = 0, e = args.size(); i < e; ++i) {
33 llvm::errs() <<
"PrintFunctionNames arg = " << args[i] <<
"\n";
35 std::regex declaration_count_regex(
"^--declaration-count=(\\d+)$");
36 std::smatch match_results;
37 if (std::regex_match(args[i], match_results, declaration_count_regex)) {
38 auto count = std::stoi(match_results[1].str());
42 if (args.size() && args[0] ==
"help")
48 ros <<
"Help for PrintFunctionNames plugin goes here\n";
void EndSourceFileAction()
int MAX_DECLARATIONS_PER_FILE
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, llvm::StringRef)
PrintFunctionNamesAction()
void PrintHelp(llvm::raw_ostream &ros)
bool ParseArgs(const CompilerInstance &CI, const std::vector< std::string > &args)