We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ca1b91a + 0e4ed1c commit 9471134Copy full SHA for 9471134
cpp/ql/src/semmle/code/cpp/Enclosing.qll
@@ -13,6 +13,11 @@ Element stmtEnclosingElement(Stmt s) {
13
/**
14
* Gets the enclosing element of expression `e`.
15
*/
16
+// The `pragma[nomagic]` is a workaround to prevent this cached stage (and all
17
+// subsequent stages) from being evaluated twice. See QL-888. It has the effect
18
+// of making the `Conversion` class predicate get the same optimization in all
19
+// queries.
20
+pragma[nomagic]
21
cached
22
Element exprEnclosingElement(Expr e) {
23
result = exprEnclosingElement(e.getParent())
0 commit comments