}
// A completion request is sent when the user types '>' or ':', but we only
-// want to trigger on '->' and '::'. We check the preceeding text to make
+// want to trigger on '->' and '::'. We check the preceding text to make
// sure it matches what we expected.
// Running the lexer here would be more robust (e.g. we can detect comments
// and avoid triggering completion there), but we choose to err on the side
/// Configures what clang-tidy checks to run and options to use with them.
struct {
- // A comma-seperated list of globs specify which clang-tidy checks to run.
+ // A comma-separated list of globs specify which clang-tidy checks to run.
std::string Checks;
llvm::StringMap<std::string> CheckOptions;
} ClangTidy;
ASTDiags.EndSourceFile();
std::vector<Diag> Diags = CompilerInvocationDiags;
- // FIXME: Also skip generation of diagnostics alltogether to speed up ast
+ // FIXME: Also skip generation of diagnostics altogether to speed up ast
// builds when we are patching a stale preamble.
// Add diagnostics from the preamble, if any.
if (Preamble)
namespace clang {
namespace clangd {
-/// The captured AST conext.
+/// The captured AST context.
/// Keeps necessary structs for an ASTContext and Preprocessor alive.
/// This enables consuming them after context that produced the AST is gone.
/// (e.g. indexing a preamble ast on a separate thread). ASTContext stored
const SourceManager &SM);
/// Adjusts CI (which compiles the modified inputs) to be used with the
- /// baseline preamble. This is done by inserting an artifical include to the
+ /// baseline preamble. This is done by inserting an artificial include to the
/// \p CI that contains new directives calculated in create.
void apply(CompilerInvocation &CI) const;
// Emit diagnostics from (possibly) stale preamble while waiting for a
// rebuild. Newly built preamble cannot emit diagnostics before this call
// finishes (ast callbacks are called from astpeer thread), hence we
- // gurantee eventual consistency.
+ // guarantee eventual consistency.
if (LatestPreamble && WantDiags != WantDiagnostics::No)
generateDiagnostics(std::move(Invocation), std::move(Inputs),
std::move(CompilerInvocationDiags));
// We haven't released anything yet, we're still waiting.
EXPECT_THAT(Throttler.Releases, testing::IsEmpty());
- // FIXME: This is flaky, becaues the request can be destroyed after shutdown
+ // FIXME: This is flaky, because the request can be destroyed after shutdown
// if it hasn't been dequeued yet (stop() resets NextRequest).
#if 0
// Now close file A, which will shut down its AST worker.