[clangd] Fix many typos. NFC
authorFangrui Song <maskray@google.com>
Sat, 1 Sep 2018 07:47:03 +0000 (07:47 +0000)
committerFangrui Song <maskray@google.com>
Sat, 1 Sep 2018 07:47:03 +0000 (07:47 +0000)
llvm-svn: 341273

clang-tools-extra/clangd/Logger.h
clang-tools-extra/clangd/index/FileIndex.h
clang-tools-extra/clangd/index/Index.cpp
clang-tools-extra/clangd/index/Index.h
clang-tools-extra/clangd/index/MemIndex.cpp
clang-tools-extra/clangd/index/Merge.cpp
clang-tools-extra/clangd/index/Merge.h
clang-tools-extra/clangd/index/SymbolCollector.h
clang-tools-extra/clangd/index/dex/Trigram.h

index cc6e3a0..0c8203c 100644 (file)
@@ -56,7 +56,7 @@ void log(Logger::Level L, const char *Fmt, Ts &&... Vals) {
 template <typename... Ts> void elog(const char *Fmt, Ts &&... Vals) {
   detail::log(Logger::Error, Fmt, std::forward<Ts>(Vals)...);
 }
-// log() is used for information important to understanding a clangd session.
+// log() is used for information important to understand a clangd session.
 // e.g. the names of LSP messages sent are logged at this level.
 // This level could be enabled in production builds to allow later inspection.
 template <typename... Ts> void log(const char *Fmt, Ts &&... Vals) {
index 0794472..a19d73d 100644 (file)
@@ -36,7 +36,7 @@ namespace clangd {
 /// the snapshot, either this class or the symbol index.
 ///
 /// The snapshot semantics keeps critical sections minimal since we only need
-/// locking when we swap or obtain refereces to snapshots.
+/// locking when we swap or obtain references to snapshots.
 class FileSymbols {
 public:
   /// \brief Updates all symbols and occurrences in a file.
@@ -60,7 +60,7 @@ private:
   llvm::StringMap<std::shared_ptr<SymbolOccurrenceSlab>> FileToOccurrenceSlabs;
 };
 
-/// \brief This manages symbls from files and an in-memory index on all symbols.
+/// \brief This manages symbols from files and an in-memory index on all symbols.
 class FileIndex : public SymbolIndex {
 public:
   /// If URISchemes is empty, the default schemes in SymbolCollector will be
index 3a53ce4..20e4b44 100644 (file)
@@ -152,7 +152,7 @@ void SymbolOccurrenceSlab::insert(const SymbolID &SymID,
 }
 
 void SymbolOccurrenceSlab::freeze() {
-  // Deduplicate symbol occurrenes.
+  // Deduplicate symbol occurrences.
   for (auto &IDAndOccurrence : Occurrences) {
     auto &Occurrence = IDAndOccurrence.getSecond();
     std::sort(Occurrence.begin(), Occurrence.end());
index 410919b..63e87a2 100644 (file)
@@ -456,7 +456,7 @@ public:
   /// CrossReference finds all symbol occurrences (e.g. references,
   /// declarations, definitions) and applies \p Callback on each result.
   ///
-  /// Resutls are returned in arbitrary order.
+  /// Results are returned in arbitrary order.
   ///
   /// The returned result must be deep-copied if it's used outside Callback.
   virtual void findOccurrences(
index 8d314d1..c73c09a 100644 (file)
@@ -44,7 +44,7 @@ void MemIndex::build(std::shared_ptr<std::vector<const Symbol *>> Syms,
   {
     std::lock_guard<std::mutex> Lock(Mutex);
     Index = std::move(TempIndex);
-    Symbols = std::move(Syms); // Relase old symbols.
+    Symbols = std::move(Syms); // Release old symbols.
     Occurrences = std::move(AllOccurrences);
   }
 
index 27a4785..1bca61e 100644 (file)
@@ -87,7 +87,7 @@ class MergedIndex : public SymbolIndex {
     // We consider the dynamic index authoritative and report all its
     // occurrences, and only report static index occurrences from other files.
     //
-    // FIXME: The heuristic fails if the dynamic index containts a file, but all
+    // FIXME: The heuristic fails if the dynamic index contains a file, but all
     // occurrences were removed (we will report stale ones from the static
     // index). Ultimately we should explicit check which index has the file
     // instead.
index 38a6887..acf9ce1 100644 (file)
@@ -20,7 +20,7 @@ namespace clangd {
 // Returned symbol may contain data owned by either source.
 Symbol mergeSymbol(const Symbol &L, const Symbol &R);
 
-// mergedIndex returns a composite index based on two provided Indexes:
+// mergeIndex returns a composite index based on two provided Indexes:
 //  - the Dynamic index covers few files, but is relatively up-to-date.
 //  - the Static index covers a bigger set of files, but is relatively stale.
 // The returned index attempts to combine results, and avoid duplicates.
index fb98b68..ab88c06 100644 (file)
@@ -104,7 +104,7 @@ private:
   // All Symbols collected from the AST.
   SymbolSlab::Builder Symbols;
   // All symbol occurrences collected from the AST.
-  // Only symbols declared in preamble (from #inclues) and references from the
+  // Only symbols declared in preamble (from #include) and references from the
   // main file will be included.
   SymbolOccurrenceSlab SymbolOccurrences;
   ASTContext *ASTCtx;
index a3fc6b3..665b0da 100644 (file)
@@ -62,7 +62,7 @@ std::vector<Token> generateIdentifierTrigrams(llvm::StringRef Identifier);
 ///
 /// For short queries (less than 3 characters with Head or Tail roles in Fuzzy
 /// Matching segmentation) this returns a single trigram with the first
-/// characters (up to 3) to perfrom prefix match.
+/// characters (up to 3) to perform prefix match.
 std::vector<Token> generateQueryTrigrams(llvm::StringRef Query);
 
 } // namespace dex