[clang-tools-extra] r338021 - [clangd] Fix (most) naming warnings from clang-tidy. NFC

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 26 05:05:31 PDT 2018


Author: ibiryukov
Date: Thu Jul 26 05:05:31 2018
New Revision: 338021

URL: http://llvm.org/viewvc/llvm-project?rev=338021&view=rev
Log:
[clangd] Fix (most) naming warnings from clang-tidy. NFC

Modified:
    clang-tools-extra/trunk/clangd/ClangdUnit.cpp
    clang-tools-extra/trunk/clangd/ClangdUnit.h
    clang-tools-extra/trunk/clangd/CodeComplete.cpp
    clang-tools-extra/trunk/clangd/CodeCompletionStrings.cpp
    clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp
    clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h
    clang-tools-extra/trunk/clangd/Protocol.cpp
    clang-tools-extra/trunk/clangd/Quality.cpp
    clang-tools-extra/trunk/clangd/TUScheduler.cpp
    clang-tools-extra/trunk/clangd/XRefs.cpp
    clang-tools-extra/trunk/clangd/index/Merge.cpp
    clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp
    clang-tools-extra/trunk/clangd/index/SymbolYAML.h
    clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
    clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp
    clang-tools-extra/trunk/unittests/clangd/TestTU.cpp

Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdUnit.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdUnit.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdUnit.cpp Thu Jul 26 05:05:31 2018
@@ -121,7 +121,7 @@ void clangd::dumpAST(ParsedAST &AST, llv
 }
 
 llvm::Optional<ParsedAST>
-ParsedAST::Build(std::unique_ptr<clang::CompilerInvocation> CI,
+ParsedAST::build(std::unique_ptr<clang::CompilerInvocation> CI,
                  std::shared_ptr<const PreambleData> Preamble,
                  std::unique_ptr<llvm::MemoryBuffer> Buffer,
                  std::shared_ptr<PCHContainerOperations> PCHs,
@@ -367,7 +367,7 @@ llvm::Optional<ParsedAST> clangd::buildA
     // dirs.
   }
 
-  return ParsedAST::Build(
+  return ParsedAST::build(
       llvm::make_unique<CompilerInvocation>(*Invocation), Preamble,
       llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents), PCHs, Inputs.FS);
 }

Modified: clang-tools-extra/trunk/clangd/ClangdUnit.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdUnit.h?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdUnit.h (original)
+++ clang-tools-extra/trunk/clangd/ClangdUnit.h Thu Jul 26 05:05:31 2018
@@ -68,7 +68,7 @@ public:
   /// Attempts to run Clang and store parsed AST. If \p Preamble is non-null
   /// it is reused during parsing.
   static llvm::Optional<ParsedAST>
-  Build(std::unique_ptr<clang::CompilerInvocation> CI,
+  build(std::unique_ptr<clang::CompilerInvocation> CI,
         std::shared_ptr<const PreambleData> Preamble,
         std::unique_ptr<llvm::MemoryBuffer> Buffer,
         std::shared_ptr<PCHContainerOperations> PCHs,

Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeComplete.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeComplete.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeComplete.cpp Thu Jul 26 05:05:31 2018
@@ -704,7 +704,7 @@ public:
           CurrentArg, S, *Allocator, CCTUInfo, true);
       assert(CCS && "Expected the CodeCompletionString to be non-null");
       // FIXME: for headers, we need to get a comment from the index.
-      SigHelp.signatures.push_back(ProcessOverloadCandidate(
+      SigHelp.signatures.push_back(processOverloadCandidate(
           Candidate, *CCS,
           getParameterDocComment(S.getASTContext(), Candidate, CurrentArg,
                                  /*CommentsFromHeaders=*/false)));
@@ -719,7 +719,7 @@ private:
   // FIXME(ioeric): consider moving CodeCompletionString logic here to
   // CompletionString.h.
   SignatureInformation
-  ProcessOverloadCandidate(const OverloadCandidate &Candidate,
+  processOverloadCandidate(const OverloadCandidate &Candidate,
                            const CodeCompletionString &CCS,
                            llvm::StringRef DocComment) const {
     SignatureInformation Result;

Modified: clang-tools-extra/trunk/clangd/CodeCompletionStrings.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeCompletionStrings.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeCompletionStrings.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeCompletionStrings.cpp Thu Jul 26 05:05:31 2018
@@ -32,7 +32,7 @@ void appendEscapeSnippet(const llvm::Str
   }
 }
 
-bool LooksLikeDocComment(llvm::StringRef CommentText) {
+bool looksLikeDocComment(llvm::StringRef CommentText) {
   // We don't report comments that only contain "special" chars.
   // This avoids reporting various delimiters, like:
   //   =================
@@ -67,7 +67,7 @@ std::string getDocComment(const ASTConte
   // write them into PCH, because they are racy and slow to load.
   assert(!Ctx.getSourceManager().isLoadedSourceLocation(RC->getLocStart()));
   std::string Doc = RC->getFormattedText(Ctx.getSourceManager(), Ctx.getDiagnostics());
-  if (!LooksLikeDocComment(Doc))
+  if (!looksLikeDocComment(Doc))
     return "";
   return Doc;
 }
@@ -86,7 +86,7 @@ getParameterDocComment(const ASTContext
   // write them into PCH, because they are racy and slow to load.
   assert(!Ctx.getSourceManager().isLoadedSourceLocation(RC->getLocStart()));
   std::string Doc = RC->getFormattedText(Ctx.getSourceManager(), Ctx.getDiagnostics());
-  if (!LooksLikeDocComment(Doc))
+  if (!looksLikeDocComment(Doc))
     return "";
   return Doc;
 }

Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp (original)
+++ clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp Thu Jul 26 05:05:31 2018
@@ -109,10 +109,10 @@ void clangd::reply(json::Value &&Result)
       });
 }
 
-void clangd::replyError(ErrorCode code, const llvm::StringRef &Message) {
-  elog("Error {0}: {1}", static_cast<int>(code), Message);
+void clangd::replyError(ErrorCode Code, const llvm::StringRef &Message) {
+  elog("Error {0}: {1}", static_cast<int>(Code), Message);
   RequestSpan::attach([&](json::Object &Args) {
-    Args["Error"] = json::Object{{"code", static_cast<int>(code)},
+    Args["Error"] = json::Object{{"code", static_cast<int>(Code)},
                                  {"message", Message.str()}};
   });
 
@@ -123,7 +123,7 @@ void clangd::replyError(ErrorCode code,
         ->writeMessage(json::Object{
             {"jsonrpc", "2.0"},
             {"id", *ID},
-            {"error", json::Object{{"code", static_cast<int>(code)},
+            {"error", json::Object{{"code", static_cast<int>(Code)},
                                    {"message", Message}}},
         });
   }

Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h (original)
+++ clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h Thu Jul 26 05:05:31 2018
@@ -63,7 +63,7 @@ private:
 void reply(llvm::json::Value &&Result);
 /// Sends an error response to the client, and logs it.
 /// Current context must derive from JSONRPCDispatcher::Handler.
-void replyError(ErrorCode code, const llvm::StringRef &Message);
+void replyError(ErrorCode Code, const llvm::StringRef &Message);
 /// Sends a request to the client.
 /// Current context must derive from JSONRPCDispatcher::Handler.
 void call(llvm::StringRef Method, llvm::json::Value &&Params);

Modified: clang-tools-extra/trunk/clangd/Protocol.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Protocol.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Protocol.cpp (original)
+++ clang-tools-extra/trunk/clangd/Protocol.cpp Thu Jul 26 05:05:31 2018
@@ -208,10 +208,10 @@ bool fromJSON(const json::Value &Params,
 }
 
 SymbolKind adjustKindToCapability(SymbolKind Kind,
-                                  SymbolKindBitset &supportedSymbolKinds) {
+                                  SymbolKindBitset &SupportedSymbolKinds) {
   auto KindVal = static_cast<size_t>(Kind);
-  if (KindVal >= SymbolKindMin && KindVal <= supportedSymbolKinds.size() &&
-      supportedSymbolKinds[KindVal])
+  if (KindVal >= SymbolKindMin && KindVal <= SupportedSymbolKinds.size() &&
+      SupportedSymbolKinds[KindVal])
     return Kind;
 
   switch (Kind) {

Modified: clang-tools-extra/trunk/clangd/Quality.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Quality.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Quality.cpp (original)
+++ clang-tools-extra/trunk/clangd/Quality.cpp Thu Jul 26 05:05:31 2018
@@ -27,7 +27,7 @@
 namespace clang {
 namespace clangd {
 using namespace llvm;
-static bool IsReserved(StringRef Name) {
+static bool isReserved(StringRef Name) {
   // FIXME: Should we exclude _Bool and others recognized by the standard?
   return Name.size() >= 2 && Name[0] == '_' &&
          (isUppercase(Name[1]) || Name[1] == '_');
@@ -174,15 +174,15 @@ void SymbolQualitySignals::merge(const C
 
   if (SemaCCResult.Declaration) {
     if (auto *ID = SemaCCResult.Declaration->getIdentifier())
-      ReservedName = ReservedName || IsReserved(ID->getName());
+      ReservedName = ReservedName || isReserved(ID->getName());
   } else if (SemaCCResult.Kind == CodeCompletionResult::RK_Macro)
-    ReservedName = ReservedName || IsReserved(SemaCCResult.Macro->getName());
+    ReservedName = ReservedName || isReserved(SemaCCResult.Macro->getName());
 }
 
 void SymbolQualitySignals::merge(const Symbol &IndexResult) {
   References = std::max(IndexResult.References, References);
   Category = categorize(IndexResult.SymInfo);
-  ReservedName = ReservedName || IsReserved(IndexResult.Name);
+  ReservedName = ReservedName || isReserved(IndexResult.Name);
 }
 
 float SymbolQualitySignals::evaluate() const {
@@ -199,8 +199,8 @@ float SymbolQualitySignals::evaluate() c
     //   boost = f * sigmoid(m * std::log(References)) - 0.5 * f + 0.59
     // Sample data points: (10, 1.00), (100, 1.41), (1000, 1.82),
     //                     (10K, 2.21), (100K, 2.58), (1M, 2.94)
-    float s = std::pow(References, -0.06);
-    Score *= 6.0 * (1 - s) / (1 + s) + 0.59;
+    float S = std::pow(References, -0.06);
+    Score *= 6.0 * (1 - S) / (1 + S) + 0.59;
   }
 
   if (Deprecated)
@@ -241,7 +241,7 @@ raw_ostream &operator<<(raw_ostream &OS,
 }
 
 static SymbolRelevanceSignals::AccessibleScope
-ComputeScope(const NamedDecl *D) {
+computeScope(const NamedDecl *D) {
   // Injected "Foo" within the class "Foo" has file scope, not class scope.
   const DeclContext *DC = D->getDeclContext();
   if (auto *R = dyn_cast_or_null<RecordDecl>(D))
@@ -291,7 +291,7 @@ void SymbolRelevanceSignals::merge(const
 
   // Declarations are scoped, others (like macros) are assumed global.
   if (SemaCCResult.Declaration)
-    Scope = std::min(Scope, ComputeScope(SemaCCResult.Declaration));
+    Scope = std::min(Scope, computeScope(SemaCCResult.Declaration));
 }
 
 static std::pair<float, unsigned> proximityScore(llvm::StringRef SymbolURI,

Modified: clang-tools-extra/trunk/clangd/TUScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/TUScheduler.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/TUScheduler.cpp (original)
+++ clang-tools-extra/trunk/clangd/TUScheduler.cpp Thu Jul 26 05:05:31 2018
@@ -159,7 +159,7 @@ public:
   /// is null, all requests will be processed on the calling thread
   /// synchronously instead. \p Barrier is acquired when processing each
   /// request, it is be used to limit the number of actively running threads.
-  static ASTWorkerHandle Create(PathRef FileName,
+  static ASTWorkerHandle create(PathRef FileName,
                                 TUScheduler::ASTCache &IdleASTs,
                                 AsyncTaskRunner *Tasks, Semaphore &Barrier,
                                 steady_clock::duration UpdateDebounce,
@@ -282,7 +282,7 @@ private:
   std::shared_ptr<ASTWorker> Worker;
 };
 
-ASTWorkerHandle ASTWorker::Create(PathRef FileName,
+ASTWorkerHandle ASTWorker::create(PathRef FileName,
                                   TUScheduler::ASTCache &IdleASTs,
                                   AsyncTaskRunner *Tasks, Semaphore &Barrier,
                                   steady_clock::duration UpdateDebounce,
@@ -639,7 +639,7 @@ void TUScheduler::update(
   std::unique_ptr<FileData> &FD = Files[File];
   if (!FD) {
     // Create a new worker to process the AST-related tasks.
-    ASTWorkerHandle Worker = ASTWorker::Create(
+    ASTWorkerHandle Worker = ASTWorker::create(
         File, *IdleASTs, WorkerThreads ? WorkerThreads.getPointer() : nullptr,
         Barrier, UpdateDebounce, PCHOps, StorePreamblesInMemory,
         PreambleCallback);

Modified: clang-tools-extra/trunk/clangd/XRefs.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/XRefs.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/XRefs.cpp (original)
+++ clang-tools-extra/trunk/clangd/XRefs.cpp Thu Jul 26 05:05:31 2018
@@ -25,7 +25,7 @@ namespace {
 // Get the definition from a given declaration `D`.
 // Return nullptr if no definition is found, or the declaration type of `D` is
 // not supported.
-const Decl *GetDefinition(const Decl *D) {
+const Decl *getDefinition(const Decl *D) {
   assert(D);
   if (const auto *TD = dyn_cast<TagDecl>(D))
     return TD->getDefinition();
@@ -40,7 +40,7 @@ const Decl *GetDefinition(const Decl *D)
 // HintPath is used to resolve the path of URI.
 // FIXME: figure out a good home for it, and share the implementation with
 // FindSymbols.
-llvm::Optional<Location> ToLSPLocation(const SymbolLocation &Loc,
+llvm::Optional<Location> toLSPLocation(const SymbolLocation &Loc,
                                        llvm::StringRef HintPath) {
   if (!Loc)
     return llvm::None;
@@ -116,7 +116,7 @@ public:
       // We don't use parameter `D`, as Parameter `D` is the canonical
       // declaration, which is the first declaration of a redeclarable
       // declaration, and it could be a forward declaration.
-      if (const auto *Def = GetDefinition(D)) {
+      if (const auto *Def = getDefinition(D)) {
         Decls.push_back(Def);
       } else {
         // Couldn't find a definition, fall back to use `D`.
@@ -279,7 +279,7 @@ std::vector<Location> findDefinitions(Pa
     auto L = makeLocation(AST, SourceRange(Loc, Loc));
     // The declaration in the identified symbols is a definition if possible
     // otherwise it is declaration.
-    bool IsDef = GetDefinition(D) == D;
+    bool IsDef = getDefinition(D) == D;
     // Populate one of the slots with location for the AST.
     if (!IsDef)
       Candidate.Decl = L;
@@ -305,9 +305,9 @@ std::vector<Location> findDefinitions(Pa
           auto &Value = It->second;
 
           if (!Value.Def)
-            Value.Def = ToLSPLocation(Sym.Definition, HintPath);
+            Value.Def = toLSPLocation(Sym.Definition, HintPath);
           if (!Value.Decl)
-            Value.Decl = ToLSPLocation(Sym.CanonicalDeclaration, HintPath);
+            Value.Decl = toLSPLocation(Sym.CanonicalDeclaration, HintPath);
         });
   }
 
@@ -410,7 +410,7 @@ std::vector<DocumentHighlight> findDocum
   return DocHighlightsFinder.takeHighlights();
 }
 
-static PrintingPolicy PrintingPolicyForDecls(PrintingPolicy Base) {
+static PrintingPolicy printingPolicyForDecls(PrintingPolicy Base) {
   PrintingPolicy Policy(Base);
 
   Policy.AnonymousTagLocations = false;
@@ -424,11 +424,11 @@ static PrintingPolicy PrintingPolicyForD
 
 /// Return a string representation (e.g. "class MyNamespace::MyClass") of
 /// the type declaration \p TD.
-static std::string TypeDeclToString(const TypeDecl *TD) {
+static std::string typeDeclToString(const TypeDecl *TD) {
   QualType Type = TD->getASTContext().getTypeDeclType(TD);
 
   PrintingPolicy Policy =
-      PrintingPolicyForDecls(TD->getASTContext().getPrintingPolicy());
+      printingPolicyForDecls(TD->getASTContext().getPrintingPolicy());
 
   std::string Name;
   llvm::raw_string_ostream Stream(Name);
@@ -439,10 +439,10 @@ static std::string TypeDeclToString(cons
 
 /// Return a string representation (e.g. "namespace ns1::ns2") of
 /// the named declaration \p ND.
-static std::string NamedDeclQualifiedName(const NamedDecl *ND,
+static std::string namedDeclQualifiedName(const NamedDecl *ND,
                                           StringRef Prefix) {
   PrintingPolicy Policy =
-      PrintingPolicyForDecls(ND->getASTContext().getPrintingPolicy());
+      printingPolicyForDecls(ND->getASTContext().getPrintingPolicy());
 
   std::string Name;
   llvm::raw_string_ostream Stream(Name);
@@ -461,11 +461,11 @@ static llvm::Optional<std::string> getSc
   if (isa<TranslationUnitDecl>(DC))
     return std::string("global namespace");
   if (const TypeDecl *TD = dyn_cast<TypeDecl>(DC))
-    return TypeDeclToString(TD);
+    return typeDeclToString(TD);
   else if (const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(DC))
-    return NamedDeclQualifiedName(ND, "namespace");
+    return namedDeclQualifiedName(ND, "namespace");
   else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(DC))
-    return NamedDeclQualifiedName(FD, "function");
+    return namedDeclQualifiedName(FD, "function");
 
   return llvm::None;
 }
@@ -492,7 +492,7 @@ static Hover getHoverContents(const Decl
   llvm::raw_string_ostream OS(DeclText);
 
   PrintingPolicy Policy =
-      PrintingPolicyForDecls(D->getASTContext().getPrintingPolicy());
+      printingPolicyForDecls(D->getASTContext().getPrintingPolicy());
 
   D->print(OS, Policy);
 
@@ -507,7 +507,7 @@ static Hover getHoverContents(QualType T
   Hover H;
   std::string TypeText;
   llvm::raw_string_ostream OS(TypeText);
-  PrintingPolicy Policy = PrintingPolicyForDecls(ASTCtx.getPrintingPolicy());
+  PrintingPolicy Policy = printingPolicyForDecls(ASTCtx.getPrintingPolicy());
   T.print(OS, Policy);
   OS.flush();
   H.contents.value += TypeText;

Modified: clang-tools-extra/trunk/clangd/index/Merge.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Merge.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/Merge.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/Merge.cpp Thu Jul 26 05:05:31 2018
@@ -77,7 +77,7 @@ class MergedIndex : public SymbolIndex {
 private:
   const SymbolIndex *Dynamic, *Static;
 };
-}
+} // namespace
 
 Symbol
 mergeSymbol(const Symbol &L, const Symbol &R, Symbol::Details *Scratch) {

Modified: clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp Thu Jul 26 05:05:31 2018
@@ -168,7 +168,7 @@ template <> struct ScalarEnumerationTrai
 namespace clang {
 namespace clangd {
 
-SymbolSlab SymbolsFromYAML(llvm::StringRef YAMLContent) {
+SymbolSlab symbolsFromYAML(llvm::StringRef YAMLContent) {
   // Store data of pointer fields (excl. `StringRef`) like `Detail`.
   llvm::BumpPtrAllocator Arena;
   llvm::yaml::Input Yin(YAMLContent, &Arena);

Modified: clang-tools-extra/trunk/clangd/index/SymbolYAML.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/SymbolYAML.h?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/SymbolYAML.h (original)
+++ clang-tools-extra/trunk/clangd/index/SymbolYAML.h Thu Jul 26 05:05:31 2018
@@ -27,7 +27,7 @@ namespace clang {
 namespace clangd {
 
 // Read symbols from a YAML-format string.
-SymbolSlab SymbolsFromYAML(llvm::StringRef YAMLContent);
+SymbolSlab symbolsFromYAML(llvm::StringRef YAMLContent);
 
 // Read one symbol from a YAML-stream.
 // The arena must be the Input's context! (i.e. yaml::Input Input(Text, &Arena))

Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp (original)
+++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Thu Jul 26 05:05:31 2018
@@ -40,7 +40,7 @@ std::unique_ptr<SymbolIndex> buildStatic
     llvm::errs() << "Can't open " << YamlSymbolFile << "\n";
     return nullptr;
   }
-  auto Slab = SymbolsFromYAML(Buffer.get()->getBuffer());
+  auto Slab = symbolsFromYAML(Buffer.get()->getBuffer());
   SymbolSlab::Builder SymsBuilder;
   for (auto Sym : Slab)
     SymsBuilder.insert(Sym);

Modified: clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp?rev=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp Thu Jul 26 05:05:31 2018
@@ -723,14 +723,14 @@ CompletionSnippetSuffix:    '-snippet'
 ...
 )";
 
-  auto Symbols1 = SymbolsFromYAML(YAML1);
+  auto Symbols1 = symbolsFromYAML(YAML1);
 
   EXPECT_THAT(Symbols1,
               UnorderedElementsAre(AllOf(QName("clang::Foo1"), Labeled("Foo1"),
                                          Doc("Foo doc"), ReturnType("int"),
                                          DeclURI("file:///path/foo.h"),
                                          ForCodeCompletion(true))));
-  auto Symbols2 = SymbolsFromYAML(YAML2);
+  auto Symbols2 = symbolsFromYAML(YAML2);
   EXPECT_THAT(Symbols2, UnorderedElementsAre(AllOf(
                             QName("clang::Foo2"), Labeled("Foo2-sig"),
                             Not(HasReturnType()), DeclURI("file:///path/bar.h"),
@@ -742,7 +742,7 @@ CompletionSnippetSuffix:    '-snippet'
     SymbolsToYAML(Symbols1, OS);
     SymbolsToYAML(Symbols2, OS);
   }
-  auto ConcatenatedSymbols = SymbolsFromYAML(ConcatenatedYAML);
+  auto ConcatenatedSymbols = symbolsFromYAML(ConcatenatedYAML);
   EXPECT_THAT(ConcatenatedSymbols,
               UnorderedElementsAre(QName("clang::Foo1"),
                                    QName("clang::Foo2")));

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=338021&r1=338020&r2=338021&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/TestTU.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/TestTU.cpp Thu Jul 26 05:05:31 2018
@@ -30,7 +30,7 @@ ParsedAST TestTU::build() const {
     Cmd.push_back(FullHeaderName.c_str());
   }
   Cmd.insert(Cmd.end(), ExtraArgs.begin(), ExtraArgs.end());
-  auto AST = ParsedAST::Build(
+  auto AST = ParsedAST::build(
       createInvocationFromCommandLine(Cmd), nullptr,
       MemoryBuffer::getMemBufferCopy(Code),
       std::make_shared<PCHContainerOperations>(),




More information about the cfe-commits mailing list