Skip to content

Commit

Permalink
Ignore extern pointers to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Jun 7, 2024
1 parent fcf5573 commit 3f70bad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/fetchers/GlobalVariableUsageMatchCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
}
Expand Down

0 comments on commit 3f70bad

Please sign in to comment.