Skip to content

Commit 4048915

Browse files
committed
C++: Remove self edges from non-post-update SSA.
1 parent c0b3a18 commit 4048915

File tree

3 files changed

+2
-566
lines changed

3 files changed

+2
-566
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,8 @@ private predicate ssaFlowImpl(SsaDefOrUse defOrUse, Node nodeFrom, Node nodeTo,
677677
not nodeFrom = any(PostUpdateNode pun).getPreUpdateNode() and
678678
nodeToDefOrUse(nodeFrom, defOrUse, uncertain) and
679679
adjacentDefRead(defOrUse, use) and
680-
useToNode(use, nodeTo)
680+
useToNode(use, nodeTo) and
681+
nodeFrom != nodeTo
681682
or
682683
// Initial global variable value to a first use
683684
nodeFrom.(InitialGlobalValue).getGlobalDef() = defOrUse and

0 commit comments

Comments
 (0)