mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Use more meaningful name
This commit is contained in:
committed by
Jonas Jensen
parent
6d4d131ad4
commit
b1632587bc
@@ -4,7 +4,7 @@ class A
|
||||
class C
|
||||
{
|
||||
public:
|
||||
virtual void f(void *) {}
|
||||
virtual void insert(void *) {}
|
||||
};
|
||||
class C1 : public C
|
||||
{
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
{
|
||||
C cc;
|
||||
C ct;
|
||||
cc.f(nullptr);
|
||||
ct.f(new C());
|
||||
cc.insert(nullptr);
|
||||
ct.insert(new C());
|
||||
sink(&cc); // no flow
|
||||
sink(&ct); // flow
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class Conf extends Configuration {
|
||||
|
||||
override predicate isAdditionalFlowStep(Node a, Node b) {
|
||||
b.asPartialDefinition() = any(Call c |
|
||||
c.getTarget().hasName("f") and c.getAnArgument() = a.asExpr()
|
||||
c.getTarget().hasName("insert") and c.getAnArgument() = a.asExpr()
|
||||
).getQualifier()
|
||||
or
|
||||
b.asExpr().(AddressOfExpr).getOperand() = a.asExpr()
|
||||
|
||||
Reference in New Issue
Block a user