Skip to content

Commit 66381e8

Browse files
author
Dave Bartolomeo
committed
C++: Add comment from PR feedback
1 parent 4b44afe commit 66381e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,11 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr {
17671767
override ConditionalExpr expr;
17681768

17691769
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) {
1770+
// Note that the ternary flavor needs no explicit `ConditionalBranch` instruction here, because
1771+
// the condition is a `TranslatedCondition`, which will simply connect the successor edges of
1772+
// the condition directly to the appropriate then/else block via
1773+
// `getChild[True|False]Successor()`.
1774+
// The binary flavor will override this predicate to add the `ConditionalBranch`.
17701775
not resultIsVoid() and
17711776
(
17721777
(

0 commit comments

Comments
 (0)