Linking function definition with its declaration
- Linguagem predominante
- CodeQL
- Estrelas
- 10.1k
- Forks
- 2.1k
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 141
Descrição
I wrote this predicate to link the function definition with its declaration in case its definition is implemented in an external library. It works as expected but it takes time. So is there any other method to check for external functions (i.e. implemented in external libraries).
```
/**
* This predicate tries to link the function definition with its declaration
* defined in external libraries. The reason behind this is that when we try to
* get the definition of a function call, which is defined in an external lib, it fails.
*/
predicate bindFunctionDeclarationWithDefinition(Function fndeclaration, Function fndefinition) {
exists( | fndefinition.hasName(fndeclaration.getName()) and
not fndeclaration.hasEntryPoint() and
not fndeclaration = fndefinition)
}
```
Thanks.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.