@@ -71,9 +71,9 @@ and automatic location of the compilation database using source files paths.
71
71
int main(int argc, const char **argv) {
72
72
// CommonOptionsParser constructor will parse arguments and create a
73
73
// CompilationDatabase. In case of error it will terminate the program.
74
- CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
74
+ auto OptionsParser = CommonOptionsParser::create (argc, argv, MyToolCategory);
75
75
76
- // Use OptionsParser. getCompilations() and OptionsParser. getSourcePathList()
76
+ // Use OptionsParser-> getCompilations() and OptionsParser-> getSourcePathList()
77
77
// to retrieve CompilationDatabase and the list of input file paths.
78
78
}
79
79
@@ -93,7 +93,7 @@ our ``FrontendAction`` over some code. For example, to run the
93
93
94
94
// We hand the CompilationDatabase we created and the sources to run over into
95
95
// the tool constructor.
96
- ClangTool Tool(OptionsParser. getCompilations(), Sources);
96
+ ClangTool Tool(OptionsParser-> getCompilations(), Sources);
97
97
98
98
// The ClangTool needs a new FrontendAction for each translation unit we run
99
99
// on. Thus, it takes a FrontendActionFactory as parameter. To create a
@@ -133,9 +133,9 @@ version of this example tool is also checked into the clang tree at
133
133
static cl::extrahelp MoreHelp("\n More help text...\n ");
134
134
135
135
int main(int argc, const char **argv) {
136
- CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
137
- ClangTool Tool(OptionsParser. getCompilations(),
138
- OptionsParser. getSourcePathList());
136
+ auto OptionsParser = CommonOptionsParser::create (argc, argv, MyToolCategory);
137
+ ClangTool Tool(OptionsParser-> getCompilations(),
138
+ OptionsParser-> getSourcePathList());
139
139
return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
140
140
}
141
141
0 commit comments