namespace { llvm::cl::OptionCategory UseOverrideCategory("Use override options"); llvm::cl::extrahelp UseOverrideCategoryHelp(R"( This tool ensures that you use the 'override' keyword appropriately. For example, given this snippet of code: struct Base { virtual void method(int); }; struct Derived : public Base { void method(int); }; Running this tool over the code will produce a warning message stating that the declaration 'method()' should be followed by the keyword 'override'. )"); } auto main(int argc, const char* argv[]) -> int { using namespace clang::tooling; CommonOptionsParser OptionsParser(argc, argv, UseOverrideCategory); ClangTool Tool(OptionsParser.getCompilations(), OptionsParser.getSourcePathList()); auto action = newFrontendActionFactory(); return Tool.run(action.get()); }