Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46e6b58

Browse files
pavgustjbj
authored andcommitted
Exclude partial defs from ordinary SSA handling
1 parent 5fbe982 commit 46e6b58

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • cpp/ql/src/semmle/code/cpp/dataflow/internal

cpp/ql/src/semmle/code/cpp/dataflow/internal/FlowVar.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ module FlowVar_internal {
173173
// the call. It's fundamental in SSA that each use is only associated with
174174
// one def, so we can't easily get this effect with SSA.
175175
not definitionByReference(v.getAnAccess(), _) and
176+
// A partially-defined variable is handled using the partial definitions logic.
177+
not any(PartialDefinitions::PartialDefinition p).partiallyDefines(v) and
176178
// SSA variables do not exist before their first assignment, but one
177179
// feature of this data flow library is to track where uninitialized data
178180
// ends up.

0 commit comments

Comments
 (0)