Skip to content

Commit

Permalink
Merge pull request #16230 from MathiasVP/fix-join-in-global-use-befor…
Browse files Browse the repository at this point in the history
…e-init

C++: Use interpolation to avoid a bad join order
  • Loading branch information
MathiasVP authored Apr 16, 2024
2 parents 4cb0695 + c3cf425 commit 8f82db0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cpp/ql/src/Critical/GlobalUseBeforeInit.ql
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,5 @@ from GlobalVariable v, Function f
where
uninitialisedBefore(v, f) and
useFunc(v, f)
select f,
"The variable '" + v.getName() + "'" +
" is used in this function but may not be initialized when it is called."
select f, "The variable $@ is used in this function but may not be initialized when it is called.",
v, v.getName()
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| test.cpp:27:5:27:6 | f1 | The variable 'b' is used in this function but may not be initialized when it is called. |
| test.cpp:27:5:27:6 | f1 | The variable $@ is used in this function but may not be initialized when it is called. | test.cpp:14:5:14:5 | b | b |

0 comments on commit 8f82db0

Please sign in to comment.