From c47a9ddf8383d4d69f655b2024aede468ffb5a35 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 19 Jan 2026 11:46:42 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll | 2 +- cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.cpp | 1 - .../library-tests/dataflow/ir-barrier-guards/test.ext.yml | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index 93153498598..eecacb14834 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -1041,7 +1041,7 @@ private module Cached { av.isFalse() and result.asBooleanValue() = false or // NOTE: The below cases don't contribute anything currently since the - // callers immediate uses `.asBooleanValue()` to convert the `GuardValue` + // callers immediately use `.asBooleanValue()` to convert the `GuardValue` // to a boolean. Once we're willing to accept the breaking change of // converting the barrier guard API to use `GuardValue`s instead `Boolean`s // we can remove this restriction. diff --git a/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.cpp b/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.cpp index ea14e5f75df..6c4b45db48f 100644 --- a/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.cpp +++ b/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.cpp @@ -20,7 +20,6 @@ bool is_clean_value(int*); int* get_clean_pointer(int* x) { return x; } bool is_clean_pointer(int*); -void sink(int); void sink(int*); void test_mad(int x, int* p) { diff --git a/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ext.yml b/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ext.yml index 9f60fc19a5e..8eeed7cd0b5 100644 --- a/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ext.yml +++ b/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ext.yml @@ -6,8 +6,8 @@ extensions: - ["", "", False, "get_clean_pointer", "", "", "ReturnValue", "test-barrier", "manual"] - ["", "", False, "get_clean_data", "", "", "ReturnValue[*]", "test-barrier", "manual"] - addsTo: - pack: codeql/cpp-all - extensible: barrierGuardModel + pack: codeql/cpp-all + extensible: barrierGuardModel data: - ["", "", False, "is_clean_value", "", "", "Argument[*0]", "true", "test-barrier", "manual"] - ["", "", False, "is_clean_pointer", "", "", "Argument[0]", "true", "test-barrier", "manual"] \ No newline at end of file