Author: kadircet Date: Fri Nov 9 09:33:48 2018 New Revision: 346524 URL: http://llvm.org/viewvc/llvm-project?rev=346524&view=rev Log: [clangd] Fix clang-tidy warnings.
Modified: clang-tools-extra/trunk/unittests/clangd/TestTU.cpp Modified: clang-tools-extra/trunk/unittests/clangd/TestTU.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/TestTU.cpp?rev=346524&r1=346523&r2=346524&view=diff ============================================================================== --- clang-tools-extra/trunk/unittests/clangd/TestTU.cpp (original) +++ clang-tools-extra/trunk/unittests/clangd/TestTU.cpp Fri Nov 9 09:33:48 2018 @@ -41,7 +41,7 @@ ParsedAST TestTU::build() const { auto Preamble = buildPreamble(FullFilename, *createInvocationFromCommandLine(Cmd), /*OldPreamble=*/nullptr, - /*OldCommand=*/Inputs.CompileCommand, Inputs, PCHs, + /*OldCompileCommand=*/Inputs.CompileCommand, Inputs, PCHs, /*StoreInMemory=*/true, /*PreambleCallback=*/nullptr); auto AST = buildAST(FullFilename, createInvocationFromCommandLine(Cmd), Inputs, Preamble, PCHs); @@ -109,17 +109,17 @@ const NamedDecl &findDecl(ParsedAST &AST } const NamedDecl &findDecl(ParsedAST &AST, - std::function<bool(const NamedDecl &)> Callback) { + std::function<bool(const NamedDecl &)> Filter) { struct Visitor : RecursiveASTVisitor<Visitor> { - decltype(Callback) CB; + decltype(Filter) F; SmallVector<const NamedDecl *, 1> Decls; bool VisitNamedDecl(const NamedDecl *ND) { - if (CB(*ND)) + if (F(*ND)) Decls.push_back(ND); return true; } } Visitor; - Visitor.CB = Callback; + Visitor.F = Filter; Visitor.TraverseDecl(AST.getASTContext().getTranslationUnitDecl()); if (Visitor.Decls.size() != 1) { ADD_FAILURE() << Visitor.Decls.size() << " symbols matched."; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits