diff --git a/clang-tools-extra/clangd/ClangdServer.h b/clang-tools-extra/clangd/ClangdServer.h index f47216a051769..eee79abee7c9d 100644 --- a/clang-tools-extra/clangd/ClangdServer.h +++ b/clang-tools-extra/clangd/ClangdServer.h @@ -145,8 +145,9 @@ class ClangdServer { /// The resource directory is used to find internal headers, overriding /// defaults and -resource-dir compiler flag). - /// If None, ClangdServer calls CompilerInvocation::GetResourcePath() to - /// obtain the standard resource directory. + /// If std::nullopt, ClangdServer calls + /// CompilerInvocation::GetResourcePath() to obtain the standard resource + /// directory. std::optional ResourceDir; /// Time to wait after a new file version before computing diagnostics. diff --git a/clang-tools-extra/clangd/ConfigFragment.h b/clang-tools-extra/clangd/ConfigFragment.h index cfce4429532b5..c1bac1019641d 100644 --- a/clang-tools-extra/clangd/ConfigFragment.h +++ b/clang-tools-extra/clangd/ConfigFragment.h @@ -167,7 +167,7 @@ struct Fragment { /// etc). Valid values are: /// - A single path to a directory (absolute, or relative to the fragment) /// - Ancestors: search all parent directories (the default) - /// - None: do not use a compilation database, just default flags. + /// - std::nullopt: do not use a compilation database, just default flags. std::optional> CompilationDatabase; }; CompileFlagsBlock CompileFlags; @@ -232,7 +232,7 @@ struct Fragment { /// /// Valid values are: /// - Strict - /// - None + /// - std::nullopt std::optional> UnusedIncludes; @@ -249,7 +249,7 @@ struct Fragment { /// /// Valid values are: /// - Strict - /// - None + /// - std::nullopt std::optional> MissingIncludes; /// Controls IncludeCleaner diagnostics. diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h index 1d6fccff6ea4d..511eae1940c6e 100644 --- a/clang-tools-extra/clangd/Protocol.h +++ b/clang-tools-extra/clangd/Protocol.h @@ -1492,7 +1492,7 @@ struct TypeHierarchyItem { /// Used to resolve a client provided item back. struct ResolveParams { SymbolID symbolID; - /// None means parents aren't resolved and empty is no parents. + /// std::nullopt means parents aren't resolved and empty is no parents. std::optional> parents; }; /// A data entry field that is preserved between a type hierarchy prepare and @@ -1618,8 +1618,8 @@ struct InlayHintsParams { /// The visible document range for which inlay hints should be computed. /// - /// None is a clangd extension, which hints for computing hints on the whole - /// file. + /// std::nullopt is a clangd extension, which hints for computing hints on the + /// whole file. std::optional range; }; bool fromJSON(const llvm::json::Value &, InlayHintsParams &, llvm::json::Path); diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 9b366cdd43eb2..126937ff49e90 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -740,8 +740,8 @@ class ASTWorker { mutable std::condition_variable RequestsCV; std::shared_ptr LatestASTSignals; /* GUARDED_BY(Mutex) */ /// Latest build preamble for current TU. - /// None means no builds yet, null means there was an error while building. - /// Only written by ASTWorker's thread. + /// std::nullopt means no builds yet, null means there was an error while + /// building. Only written by ASTWorker's thread. std::optional> LatestPreamble; std::deque PreambleRequests; /* GUARDED_BY(Mutex) */ /// Signaled whenever LatestPreamble changes state or there's a new diff --git a/clang-tools-extra/clangd/TUScheduler.h b/clang-tools-extra/clangd/TUScheduler.h index b82bbde3bd4db..8c52ec951ba5f 100644 --- a/clang-tools-extra/clangd/TUScheduler.h +++ b/clang-tools-extra/clangd/TUScheduler.h @@ -368,8 +368,8 @@ class TUScheduler { llvm::StringMap> Files; std::unique_ptr IdleASTs; std::unique_ptr HeaderIncluders; - // None when running tasks synchronously and non-None when running tasks - // asynchronously. + // std::nullopt when running tasks synchronously and non-std::nullopt when + // running tasks asynchronously. std::optional PreambleTasks; std::optional WorkerThreads; // Used to create contexts for operations that are not bound to a particular diff --git a/clang-tools-extra/clangd/refactor/InsertionPoint.cpp b/clang-tools-extra/clangd/refactor/InsertionPoint.cpp index 7f042c0cacb92..4b04021a5bd46 100644 --- a/clang-tools-extra/clangd/refactor/InsertionPoint.cpp +++ b/clang-tools-extra/clangd/refactor/InsertionPoint.cpp @@ -21,7 +21,7 @@ namespace { // Choose the decl to insert before, according to an anchor. // Nullptr means insert at end of DC. -// None means no valid place to insert. +// std::nullopt means no valid place to insert. std::optional insertionDecl(const DeclContext &DC, const Anchor &A) { bool LastMatched = false; diff --git a/clang-tools-extra/clangd/support/Threading.h b/clang-tools-extra/clangd/support/Threading.h index 1be27820513e5..78ab54101fe4f 100644 --- a/clang-tools-extra/clangd/support/Threading.h +++ b/clang-tools-extra/clangd/support/Threading.h @@ -70,7 +70,7 @@ class Deadline { std::chrono::steady_clock::time_point Time; }; -/// Makes a deadline from a timeout in seconds. None means wait forever. +/// Makes a deadline from a timeout in seconds. std::nullopt means wait forever. Deadline timeoutSeconds(std::optional Seconds); /// Wait once on CV for the specified duration. void wait(std::unique_lock &Lock, std::condition_variable &CV,