mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
C++: Use mkElement/unresolveElement consistently
This commit is contained in:
@@ -3,12 +3,12 @@ import semmle.code.cpp.dataflow.DataFlow
|
||||
|
||||
class EdgeToExcept extends AdditionalControlFlowEdge {
|
||||
EdgeToExcept() {
|
||||
this instanceof Call and
|
||||
exists(getNearestTryExceptParent(this))
|
||||
mkElement(this) instanceof Call and
|
||||
exists(getNearestTryExceptParent(mkElement(this)))
|
||||
}
|
||||
|
||||
override ControlFlowNode getAnEdgeTarget() {
|
||||
result = getNearestTryExceptParent(this).getExcept()
|
||||
result = getNearestTryExceptParent(mkElement(this)).getExcept()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,4 +31,4 @@ private Element getANearParent(Expr e) {
|
||||
|
||||
from DataFlow::Node nodeFrom, DataFlow::Node nodeTo
|
||||
where DataFlow::localFlowStep(nodeFrom, nodeTo)
|
||||
select nodeFrom, nodeTo
|
||||
select nodeFrom, nodeTo
|
||||
|
||||
Reference in New Issue
Block a user