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
1313private import semmle.code.cpp.dataflow.new.TaintTracking as Tt
1414private import semmle.code.cpp.dataflow.new.DataFlow as Df
1515private 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
1618
1719/**
1820 * Holds if `f` is a "private" function.
@@ -46,6 +48,19 @@ private predicate isUninterestingForModels(Callable api) {
4648 or
4749 api .isFromUninstantiatedTemplate ( _)
4850 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
4964 // Exclude functions in test directories (but not the ones in the CodeQL test directory)
5065 exists ( Cpp:: File f |
5166 f = api .getFile ( ) and
You can’t perform that action at this time.
0 commit comments