C++: use Declaration.hasGlobalOrStdName

This commit is contained in:
Robert Marsh
2019-07-11 16:00:41 -07:00
parent bff68a00ac
commit 03f72d207c
32 changed files with 138 additions and 125 deletions

View File

@@ -16,7 +16,7 @@ import semmle.code.cpp.controlflow.LocalScopeVariableReachability
predicate isFreeExpr(Expr e, LocalScopeVariable v) {
exists(VariableAccess va | va.getTarget() = v |
exists(FunctionCall fc | fc = e |
fc.getTarget().hasGlobalName("free") and
fc.getTarget().hasGlobalOrStdName("free") and
va = fc.getArgument(0)
)
or