From 45e23e07a8623d2e8eb6b1a3c8ce10f33d06e764 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 29 Sep 2021 09:32:08 +0200 Subject: [PATCH] Fix build on macOS Amends 901a96231c562b95f27ba2d96c204c54c551eb7a Change-Id: I4ebc961bed63a9f5a8fc3a997d0c861d779d0c11 Reviewed-by: Christian Stenger --- src/plugins/clangcodemodel/clangdclient.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index f798992d28c..55d90060d12 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -2975,9 +2975,10 @@ MessageId ClangdClient::Private::getAndHandleAst(const TextDocOrFile &doc, const AstHandler &astHandler, AstCallbackMode callbackMode) { - const auto textDocPtr = std::get_if(&doc); + const auto textDocPtr = Utils::get_if(&doc); const TextDocument * const textDoc = textDocPtr ? *textDocPtr : nullptr; - const Utils::FilePath filePath = textDoc ? textDoc->filePath() : std::get(doc); + const Utils::FilePath filePath = textDoc ? textDoc->filePath() + : Utils::get(doc); // 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)) {