From: Vedant Kumar Date: Wed, 7 Feb 2018 21:17:22 +0000 (+0000) Subject: [clang-import-test] Run clang-format, NFC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3df7258e3003fab6f728d05c1f73fb83286f7504;p=platform%2Fupstream%2Fllvm.git [clang-import-test] Run clang-format, NFC I ran across clang-import-test while looking into testing for lldb. There shouldn't be any harm in running clang-format over it. llvm-svn: 324527 --- diff --git a/clang/tools/clang-import-test/clang-import-test.cpp b/clang/tools/clang-import-test/clang-import-test.cpp index 4871acd..e2cf7d8 100644 --- a/clang/tools/clang-import-test/clang-import-test.cpp +++ b/clang/tools/clang-import-test/clang-import-test.cpp @@ -50,9 +50,10 @@ static llvm::cl::opt Direct("direct", llvm::cl::Optional, llvm::cl::desc("Use the parsed declarations without indirection")); -static llvm::cl::opt - UseOrigins("use-origins", llvm::cl::Optional, - llvm::cl::desc("Use DeclContext origin information for more accurate lookups")); +static llvm::cl::opt UseOrigins( + "use-origins", llvm::cl::Optional, + llvm::cl::desc( + "Use DeclContext origin information for more accurate lookups")); static llvm::cl::list ClangArgs("Xcc", llvm::cl::ZeroOrMore, @@ -225,7 +226,7 @@ std::unique_ptr BuildCodeGen(CompilerInstance &CI, CI.getDiagnostics(), ModuleName, CI.getHeaderSearchOpts(), CI.getPreprocessorOpts(), CI.getCodeGenOpts(), LLVMCtx)); } -} // end namespace +} // namespace init_convenience namespace { @@ -261,8 +262,8 @@ void AddExternalSource(CIAndOrigins &CI, {CI.getASTContext(), CI.getFileManager()}); llvm::SmallVector Sources; for (CIAndOrigins &Import : Imports) - Sources.push_back( - {Import.getASTContext(), Import.getFileManager(), Import.getOriginMap()}); + Sources.push_back({Import.getASTContext(), Import.getFileManager(), + Import.getOriginMap()}); auto ES = llvm::make_unique(Target, Sources); CI.getASTContext().setExternalSource(ES.release()); CI.getASTContext().getTranslationUnitDecl()->setHasExternalVisibleStorage(); @@ -334,8 +335,8 @@ llvm::Expected Parse(const std::string &Path, void Forget(CIAndOrigins &CI, llvm::MutableArrayRef Imports) { llvm::SmallVector Sources; for (CIAndOrigins &Import : Imports) - Sources.push_back( - {Import.getASTContext(), Import.getFileManager(), Import.getOriginMap()}); + Sources.push_back({Import.getASTContext(), Import.getFileManager(), + Import.getOriginMap()}); ExternalASTSource *Source = CI.CI->getASTContext().getExternalSource(); auto *Merger = static_cast(Source); Merger->RemoveSources(Sources);