File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
cpp/ql/src/Likely Bugs/Format Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,13 @@ import semmle.code.cpp.security.FlowSources
21
21
import semmle.code.cpp.ir.dataflow.internal.ModelUtil
22
22
import semmle.code.cpp.models.interfaces.DataFlow
23
23
import semmle.code.cpp.models.interfaces.Taint
24
- import semmle.code.cpp.ir.implementation.raw.Instruction
24
+ import semmle.code.cpp.ir.IR
25
25
26
26
class UncalledFunction extends Function {
27
27
UncalledFunction ( ) {
28
28
not exists ( Call c | c .getTarget ( ) = this ) and
29
- // TODO: Need rationale here, added based on suggestion
30
- //but unclear of the scenario being avoided
31
- not this .( MemberFunction ) .overrides ( _) and
32
29
// Ignore functions that appear to be function pointers
30
+ // function pointers may be seen as uncalled statically
33
31
not exists ( FunctionAccess fa | fa .getTarget ( ) = this )
34
32
}
35
33
}
@@ -39,7 +37,6 @@ class UncalledFunction extends Function {
39
37
* Grabs the base type of the underlying type of `t` if `t` is a pointer and checks `isConst()` else
40
38
* checks on the underlying type of `t` alone.
41
39
*/
42
- bindingset [ t]
43
40
predicate hasConstSpecifier ( Type t ) {
44
41
if t .getUnderlyingType ( ) instanceof PointerType
45
42
then t .getUnderlyingType ( ) .( PointerType ) .getBaseType ( ) .isConst ( )
You can’t perform that action at this time.
0 commit comments