C++: Make sure some instruction also gives back the 'ParenthesisExpr's.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-09-12 19:31:29 +01:00
parent 71fe6f5d4b
commit b03054b1ed
5 changed files with 17 additions and 10 deletions

View File

@@ -1113,6 +1113,13 @@ private module GetConvertedResultExpression {
result = tas.getExtent().getExpr() and
instr = tas.getInstruction(any(AllocationExtentConvertTag tag))
)
or
// There's no instruction that returns `ParenthesisExpr`, but some queries
// expect this
exists(TranslatedTransparentConversion ttc |
result = ttc.getExpr().(ParenthesisExpr) and
instr = ttc.getResult()
)
}
private Expr getConvertedResultExpressionImpl(Instruction instr) {