We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1c2f369 + 7c15164 commit 5ecfaedCopy full SHA for 5ecfaed
cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll
@@ -684,9 +684,17 @@ abstract class TranslatedElement extends TTranslatedElement {
684
* Gets the temporary variable generated by this element with tag `tag`.
685
*/
686
final IRTempVariable getTempVariable(TempVariableTag tag) {
687
- result.getAST() = getAST() and
688
- result.getTag() = tag and
689
- hasTempVariable(tag, _)
+ exists(Locatable ast |
+ result.getAST() = ast and
+ result.getTag() = tag and
690
+ hasTempVariableAndAST(tag, ast)
691
+ )
692
+ }
693
+
694
+ pragma[noinline]
695
+ private predicate hasTempVariableAndAST(TempVariableTag tag, Locatable ast) {
696
+ hasTempVariable(tag, _) and
697
+ ast = getAST()
698
}
699
700
/**
0 commit comments