Commit f2425ad
committed
Use database extensionals instead of their wrapper classes in two predicates
We are planning to change the charpred of `Function` in the CodeQL C++ library,
which means the code changed here will no longer compile. By switching to the
extensionals, the code will keep compiling.
DIL before:
```
noinline
`ConstantExprs::isFunction/1#600714be`(
/* Element::Element */ interned unique entity el
)
{
exists(interned dontcare string _, interned dontcare int _1 |
functions(el, _, _1)
) or
exists(interned dontcare int _ | exprparents(el, _, el))
}
noopt
`ConstantExprs::callHasNoTarget/1#e6e8caa4`(
/* @funbindexpr */ interned unique entity fc
)
{
exists(/* Function::Function */ interned entity f |
funbind(fc, f) and not(`ConstantExprs::isFunction/1#600714be`(f))
)
}
```
DIL after:
```
noinline
`ConstantExprs::isFunction/1#600714be`(/* @element */ interned unique entity el)
{
exists(interned dontcare string _, interned dontcare int _1 |
functions(el, _, _1)
) or
exists(interned dontcare int _ | exprparents(el, _, el))
}
noopt
`ConstantExprs::callHasNoTarget/1#e6e8caa4`(
/* @funbindexpr */ interned unique entity fc
)
{
exists(/* @function */ interned entity f |
funbind(fc, f) and not(`ConstantExprs::isFunction/1#600714be`(f))
)
}
```1 parent a93b1c4 commit f2425ad
File tree
1 file changed
+3
-3
lines changed- cpp/common/src/codingstandards/cpp/enhancements
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments