From 3f70bad4d3614410b8a7a3fe0b48d59b1566790b Mon Sep 17 00:00:00 2001 From: Vladislav Kalugin Date: Thu, 23 May 2024 14:00:16 +0300 Subject: [PATCH] Ignore extern pointers to functions --- server/src/fetchers/GlobalVariableUsageMatchCallback.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/fetchers/GlobalVariableUsageMatchCallback.cpp b/server/src/fetchers/GlobalVariableUsageMatchCallback.cpp index b02902ff..8d1211a5 100644 --- a/server/src/fetchers/GlobalVariableUsageMatchCallback.cpp +++ b/server/src/fetchers/GlobalVariableUsageMatchCallback.cpp @@ -67,7 +67,7 @@ void GlobalVariableUsageMatchCallback::handleUsage(const clang::FunctionDecl *fu const std::string usedParamTypeString = varDecl->getType().getAsString(); types::Type paramType = types::Type(realParamType, usedParamTypeString, sourceManager); method.globalParams.emplace_back(paramType, usage.variableName, AlignmentFetcher::fetch(varDecl)); - if (varDecl->isExternC() && !varDecl->hasDefinition()) { + if (!paramType.isPointerToFunction() && varDecl->isExternC() && !varDecl->hasDefinition()) { tests.externVariables.insert({paramType, usage.variableName}); } }