mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
C++: Implement Expr::mayBeFromImplicitlyDeclaredFunction
This commit is contained in:
@@ -300,6 +300,11 @@ class FunctionCall extends Call, @funbindexpr {
|
||||
this.isVirtual() or
|
||||
this.getTarget().getAnAttribute().getName() = "weak"
|
||||
}
|
||||
|
||||
override predicate mayBeFromImplicitlyDeclaredFunction() {
|
||||
this.getType() instanceof IntType and
|
||||
this.getTarget().getADeclarationEntry().isImplicit()
|
||||
}
|
||||
}
|
||||
|
||||
/** A _user-defined_ unary `operator*` function. */
|
||||
|
||||
@@ -534,6 +534,9 @@ class Expr extends StmtParent, @expr {
|
||||
|
||||
/** Gets the function containing this control-flow node. */
|
||||
override Function getControlFlowScope() { result = this.getEnclosingFunction() }
|
||||
|
||||
/** Holds if this expression could be the return value of an implicitly declared function. */
|
||||
predicate mayBeFromImplicitlyDeclaredFunction() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user