Use more meaningful name

This commit is contained in:
Pavel Avgustinov
2019-07-11 12:34:20 +01:00
committed by Jonas Jensen
parent 6d4d131ad4
commit b1632587bc
2 changed files with 4 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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()