summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/clangd/Logger.h2
-rw-r--r--clang-tools-extra/clangd/index/FileIndex.h4
-rw-r--r--clang-tools-extra/clangd/index/Index.cpp2
-rw-r--r--clang-tools-extra/clangd/index/Index.h2
-rw-r--r--clang-tools-extra/clangd/index/MemIndex.cpp2
-rw-r--r--clang-tools-extra/clangd/index/Merge.cpp2
-rw-r--r--clang-tools-extra/clangd/index/Merge.h2
-rw-r--r--clang-tools-extra/clangd/index/SymbolCollector.h2
-rw-r--r--clang-tools-extra/clangd/index/dex/Trigram.h2
9 files changed, 10 insertions, 10 deletions
diff --git a/clang-tools-extra/clangd/Logger.h b/clang-tools-extra/clangd/Logger.h
index cc6e3a0a7c9..0c8203c03f5 100644
--- a/clang-tools-extra/clangd/Logger.h
+++ b/clang-tools-extra/clangd/Logger.h
@@ -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) {
diff --git a/clang-tools-extra/clangd/index/FileIndex.h b/clang-tools-extra/clangd/index/FileIndex.h
index 0794472885c..a19d73d357d 100644
--- a/clang-tools-extra/clangd/index/FileIndex.h
+++ b/clang-tools-extra/clangd/index/FileIndex.h
@@ -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
diff --git a/clang-tools-extra/clangd/index/Index.cpp b/clang-tools-extra/clangd/index/Index.cpp
index 3a53ce42a19..20e4b44cc40 100644
--- a/clang-tools-extra/clangd/index/Index.cpp
+++ b/clang-tools-extra/clangd/index/Index.cpp
@@ -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());
diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h
index 410919bed06..63e87a23d99 100644
--- a/clang-tools-extra/clangd/index/Index.h
+++ b/clang-tools-extra/clangd/index/Index.h
@@ -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(
diff --git a/clang-tools-extra/clangd/index/MemIndex.cpp b/clang-tools-extra/clangd/index/MemIndex.cpp
index 8d314d1febd..c73c09a40ad 100644
--- a/clang-tools-extra/clangd/index/MemIndex.cpp
+++ b/clang-tools-extra/clangd/index/MemIndex.cpp
@@ -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);
}
diff --git a/clang-tools-extra/clangd/index/Merge.cpp b/clang-tools-extra/clangd/index/Merge.cpp
index 27a47854497..1bca61e7983 100644
--- a/clang-tools-extra/clangd/index/Merge.cpp
+++ b/clang-tools-extra/clangd/index/Merge.cpp
@@ -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.
diff --git a/clang-tools-extra/clangd/index/Merge.h b/clang-tools-extra/clangd/index/Merge.h
index 38a6887040c..acf9ce1d221 100644
--- a/clang-tools-extra/clangd/index/Merge.h
+++ b/clang-tools-extra/clangd/index/Merge.h
@@ -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.
diff --git a/clang-tools-extra/clangd/index/SymbolCollector.h b/clang-tools-extra/clangd/index/SymbolCollector.h
index fb98b683ea1..ab88c066dfa 100644
--- a/clang-tools-extra/clangd/index/SymbolCollector.h
+++ b/clang-tools-extra/clangd/index/SymbolCollector.h
@@ -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;
diff --git a/clang-tools-extra/clangd/index/dex/Trigram.h b/clang-tools-extra/clangd/index/dex/Trigram.h
index a3fc6b32b4c..665b0dae7ec 100644
--- a/clang-tools-extra/clangd/index/dex/Trigram.h
+++ b/clang-tools-extra/clangd/index/dex/Trigram.h
@@ -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
OpenPOWER on IntegriCloud