File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
cpp/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ private import semmle.code.cpp.ir.dataflow.internal.TaintTrackingImplSpecific
13
13
private import semmle.code.cpp.dataflow.new.TaintTracking as Tt
14
14
private import semmle.code.cpp.dataflow.new.DataFlow as Df
15
15
private import codeql.mad.modelgenerator.internal.ModelGeneratorImpl
16
+ private import semmle.code.cpp.models.interfaces.Taint as Taint
17
+ private import semmle.code.cpp.models.interfaces.DataFlow as DataFlow
16
18
17
19
/**
18
20
* Holds if `f` is a "private" function.
@@ -46,6 +48,19 @@ private predicate isUninterestingForModels(Callable api) {
46
48
or
47
49
api .isFromUninstantiatedTemplate ( _)
48
50
or
51
+ // No need to generate models for functions modeled by hand in QL
52
+ api instanceof Taint:: TaintFunction
53
+ or
54
+ api instanceof DataFlow:: DataFlowFunction
55
+ or
56
+ // Don't generate models for main functions
57
+ api .hasGlobalName ( "main" )
58
+ or
59
+ // Don't generate models for system-provided functions. If we want to
60
+ // generate models for these we should use a database containing the
61
+ // implementations of those system-provided functions in the source root.
62
+ not exists ( api .getLocation ( ) .getFile ( ) .getRelativePath ( ) )
63
+ or
49
64
// Exclude functions in test directories (but not the ones in the CodeQL test directory)
50
65
exists ( Cpp:: File f |
51
66
f = api .getFile ( ) and
You can’t perform that action at this time.
0 commit comments