Lines Matching +full:clang +full:- +full:everything
1 //===- IncludeFixerPlugin.cpp - clang-include-fixer as a clang plugin -----===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 #include "clang/Frontend/CompilerInstance.h"
12 #include "clang/Frontend/FrontendPluginRegistry.h"
13 #include "clang/Parse/ParseAST.h"
14 #include "clang/Sema/Sema.h"
17 namespace clang { namespace
21 /// and command line flag parsing for using include fixer as a clang plugin.
24 /// ASTConsumer for this plugin (everything is funneled on the side through
39 std::unique_ptr<clang::ASTConsumer>
40 CreateASTConsumer(clang::CompilerInstance &CI, StringRef InFile) override { in CreateASTConsumer()
42 SemaSource->setFilePath(InFile); in CreateASTConsumer()
43 SemaSource->setCompilerInstance(&CI); in CreateASTConsumer()
57 if (Arg.startswith("-db=")) in ParseArgs()
58 DB = Arg.substr(strlen("-db=")); in ParseArgs()
59 else if (Arg.startswith("-input=")) in ParseArgs()
60 Input = Arg.substr(strlen("-input=")); in ParseArgs()
65 auto CreateYamlIdx = [=]() -> std::unique_ptr<include_fixer::SymbolIndex> { in ParseArgs()
83 SymbolIndexMgr->addSymbolIndex(std::move(CreateYamlIdx)); in ParseArgs()
92 } // namespace clang
98 static clang::FrontendPluginRegistry::Add<
99 clang::include_fixer::ClangIncludeFixerPluginAction>
100 X("clang-include-fixer", "clang-include-fixer");