Skip to content

Commit c3cf425

Browse files
committed
C++: Use interpolation to avoid a bad join order.
1 parent c647f30 commit c3cf425

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cpp/ql/src/Critical/GlobalUseBeforeInit.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,5 @@ from GlobalVariable v, Function f
110110
where
111111
uninitialisedBefore(v, f) and
112112
useFunc(v, f)
113-
select f,
114-
"The variable '" + v.getName() + "'" +
115-
" is used in this function but may not be initialized when it is called."
113+
select f, "The variable $@ is used in this function but may not be initialized when it is called.",
114+
v, v.getName()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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. |
1+
| 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 commit comments

Comments
 (0)