8000 C++: Undo some of the reverting. · github/codeql@fe2c806 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe2c806

Browse files
committed
C++: Undo some of the reverting.
1 parent 84d08b0 commit fe2c806

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/internal/ConstantExprs.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ private predicate loopConditionAlwaysUponEntry(ControlFlowNode loop, Expr condit
110110
* should be in this relation.
111111
*/
112112
pragma[noinline]
113-
private predicate isFunction(Element el) {
114-
el instanceof Function
113+
private predicate isFunction(@element el) {
114+
el instanceof @function
115115
or
116116
el.(Expr).getParent() = el
117117
}
@@ -122,7 +122,7 @@ private predicate isFunction(Element el) {
122122
*/
123123
pragma[noopt]
124124
private predicate callHasNoTarget(@funbindexpr fc) {
125-
exists(Function f |
125+
exists(@function f |
126126
funbind(fc, f) and
127127
not isFunction(f)
128128
)

cpp/ql/lib/semmle/code/cpp/internal/ResolveGlobalVariable.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ private predicate isGlobalWithMangledNameAndWithoutDefinition(@mangledname name,
2424
* a unique global variable `complete` with the same name that does have a definition.
2525
*/
2626
private predicate hasTwinWithDefinition(@globalvariable incomplete, @globalvariable complete) {
27+
not variable_instantiation(incomplete, complete) and
2728
exists(@mangledname name |
28-
not variable_instantiation(incomplete, complete) and
2929
isGlobalWithMangledNameAndWithoutDefinition(name, incomplete) and
3030
isGlobalWithMangledNameAndWithDefinition(name, complete)
3131
)

0 commit comments

Comments
 (0)
0