forked from qt-creator/qt-creator
Fix build on macOS
Amends 901a96231c
Change-Id: I4ebc961bed63a9f5a8fc3a997d0c861d779d0c11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2975,9 +2975,10 @@ MessageId ClangdClient::Private::getAndHandleAst(const TextDocOrFile &doc,
|
|||||||
const AstHandler &astHandler,
|
const AstHandler &astHandler,
|
||||||
AstCallbackMode callbackMode)
|
AstCallbackMode callbackMode)
|
||||||
{
|
{
|
||||||
const auto textDocPtr = std::get_if<const TextDocument *>(&doc);
|
const auto textDocPtr = Utils::get_if<const TextDocument *>(&doc);
|
||||||
const TextDocument * const textDoc = textDocPtr ? *textDocPtr : nullptr;
|
const TextDocument * const textDoc = textDocPtr ? *textDocPtr : nullptr;
|
||||||
const Utils::FilePath filePath = textDoc ? textDoc->filePath() : std::get<Utils::FilePath>(doc);
|
const Utils::FilePath filePath = textDoc ? textDoc->filePath()
|
||||||
|
: Utils::get<Utils::FilePath>(doc);
|
||||||
|
|
||||||
// If the document's AST is in the cache and is up to date, call the handler.
|
// If the document's AST is in the cache and is up to date, call the handler.
|
||||||
if (const auto ast = textDoc ? astCache.get(textDoc) : externalAstCache.get(filePath)) {
|
if (const auto ast = textDoc ? astCache.get(textDoc) : externalAstCache.get(filePath)) {
|
||||||
|
Reference in New Issue
Block a user