From 4652003688a32c3b16193eae9c74e15893029bc3 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 2 Jul 2024 20:21:54 +0100 Subject: [PATCH 1/2] C++: Update QLDoc on 'GuardCondition' to reflect the fact that switch statements are supported. --- cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll index 57c541c4bfb7..b6bed9177734 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll @@ -59,8 +59,7 @@ class MatchValue extends AbstractValue, TMatchValue { } /** - * A Boolean condition in the AST that guards one or more basic blocks. This includes - * operands of logical operators but not switch statements. + * A Boolean condition in the AST that guards one or more basic blocks. */ cached class GuardCondition extends Expr { From 284007dbff2c9ab597282ad4e78bf2bf621d1317 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 3 Jul 2024 09:14:06 +0100 Subject: [PATCH 2/2] C++: Fix more QLDoc. --- cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll index b6bed9177734..9b4d28430ff3 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll @@ -365,10 +365,10 @@ private predicate nonExcludedIRAndBasicBlock(IRBlock irb, BasicBlock controlled) } /** - * A Boolean condition in the IR that guards one or more basic blocks. This includes - * operands of logical operators but not switch statements. Note that `&&` and `||` - * don't have an explicit representation in the IR, and therefore will not appear as - * IRGuardConditions. + * A Boolean condition in the IR that guards one or more basic blocks. + * + * Note that `&&` and `||` don't have an explicit representation in the IR, + * and therefore will not appear as IRGuardConditions. */ cached class IRGuardCondition extends Instruction {