<commit_before>#include <iostream>
#include <string>

#include <clang/Tooling/Tooling.h>
#include <clang/Tooling/CommonOptionsParser.h>
#include <llvm/Support/CommandLine.h>

using namespace llvm;
using namespace clang::tooling;
using std::string;

static cl::OptionCategory OptionsCategory("Options");

int main(int argc, const char **argv) {
  CommonOptionsParser OptionsParser(argc, argv, OptionsCategory);
  for(auto s : OptionsParser.getSourcePathList()) {
    std::cout << s << std::endl;
  }
  return 0;
}
<commit_msg>Implement action that prints file names<commit_after>#include <iostream>
#include <string>

#include <clang/Tooling/Tooling.h>
#include <clang/Tooling/CommonOptionsParser.h>
#include <clang/Frontend/FrontendActions.h>
#include <clang/AST/ASTConsumer.h>
#include <llvm/Support/CommandLine.h>

using namespace llvm;
using namespace clang;
using namespace clang::tooling;
using std::string;

class MyFrontendAction : public ASTFrontendAction {
  public:
    MyFrontendAction() {}

    std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
      std::cout << InFile.str() << std::endl;
      return nullptr;
    }
};

static cl::OptionCategory OptionsCategory("skel options");

int main(int argc, const char **argv) {
  CommonOptionsParser op(argc, argv, OptionsCategory);
  ClangTool Tool(op.getCompilations(), op.getSourcePathList());
  return Tool.run(newFrontendActionFactory<MyFrontendAction>().get());
}

{'fraction_non_alphanumeric': 0.1296043656207367, 'fraction_numerical': 0.0006821282401091405, 'mean_word_length': 6.121359223300971, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '559205', 'n_tokens_mistral': 462, 'n_tokens_neox': 463, 'n_words': 104}