Linking function definition with its declaration
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.