mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
C++: Ensure all values are bound in both disjunctions.
This commit is contained in:
@@ -19,15 +19,19 @@ class IRPartialDefNode extends IRNode {
|
||||
override string toString() { result = n.asPartialDefinition().toString() }
|
||||
}
|
||||
|
||||
from Node node, AST::Node astNode, IR::Node irNode, string msg
|
||||
from Node node, string msg
|
||||
where
|
||||
node.asIR() = irNode and
|
||||
exists(irNode.asPartialDefinition()) and
|
||||
not exists(AST::Node otherNode | otherNode.asPartialDefinition() = irNode.asPartialDefinition()) and
|
||||
exists(IR::Node irNode, Expr partial |
|
||||
node.asIR() = irNode and
|
||||
partial = irNode.asPartialDefinition() and
|
||||
not exists(AST::Node otherNode | otherNode.asPartialDefinition() = partial)
|
||||
) and
|
||||
msg = "IR only"
|
||||
or
|
||||
node.asAST() = astNode and
|
||||
exists(astNode.asPartialDefinition()) and
|
||||
not exists(IR::Node otherNode | otherNode.asPartialDefinition() = astNode.asPartialDefinition()) and
|
||||
exists(AST::Node astNode, Expr partial |
|
||||
node.asAST() = astNode and
|
||||
partial = astNode.asPartialDefinition() and
|
||||
not exists(IR::Node otherNode | otherNode.asPartialDefinition() = partial)
|
||||
) and
|
||||
msg = "AST only"
|
||||
select node, msg
|
||||
|
||||
Reference in New Issue
Block a user