File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
clang/include/clang/Tooling Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,17 +49,22 @@ namespace tooling {
49
49
// / using namespace clang::tooling;
50
50
// / using namespace llvm;
51
51
// /
52
- // / static cl::OptionCategory MyToolCategory("My tool options");
52
+ // / static cl::OptionCategory MyToolCategory("my- tool options");
53
53
// / static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);
54
54
// / static cl::extrahelp MoreHelp("\nMore help text...\n");
55
- // / static cl::opt<bool> YourOwnOption(...);
56
- // / ...
57
55
// /
58
56
// / int main(int argc, const char **argv) {
59
- // / CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
57
+ // / auto ExpectedParser =
58
+ // / CommonOptionsParser::create(argc, argv, MyToolCategory);
59
+ // / if (!ExpectedParser) {
60
+ // / llvm::errs() << ExpectedParser.takeError();
61
+ // / return 1;
62
+ // / }
63
+ // / CommonOptionsParser& OptionsParser = ExpectedParser.get();
60
64
// / ClangTool Tool(OptionsParser.getCompilations(),
61
65
// / OptionsParser.getSourcePathList());
62
- // / return Tool.run(newFrontendActionFactory<SyntaxOnlyAction>().get());
66
+ // / return Tool.run(
67
+ // / newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
63
68
// / }
64
69
// / \endcode
65
70
class CommonOptionsParser {
You can’t perform that action at this time.
0 commit comments