Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 24c9b8b

Browse files
author
Robert Marsh
committed
C++: fix unbound variables
1 parent e57fef0 commit 24c9b8b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,10 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
461461

462462
override Type getInstructionOperandType(InstructionTag tag, TypedOperandTag operandTag) {
463463
if hasSpecificReadSideEffect(any(Opcode::BufferReadSideEffect op))
464-
then result instanceof UnknownType
464+
then
465+
result instanceof UnknownType and
466+
tag instanceof OnlyInstructionTag and
467+
operandTag instanceof SideEffectOperandTag
465468
else (
466469
tag instanceof OnlyInstructionTag and
467470
result = arg.getType().getUnspecifiedType().(DerivedType).getBaseType() and

0 commit comments

Comments
 (0)