8000 C++: Revert "Merge pull request #12125 from jketema/unique-function" by MathiasVP · Pull Request #15304 · github/codeql · GitHub
[go: up one dir, main page]

Skip to content

C++: Revert "Merge pull request #12125 from jketema/unique-function" #15304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
C++: Undo some of the reverting.
  • Loading branch information
MathiasVP committed Jan 12, 2024
commit fe2c806c2db5f3dceaf2877f34a25fcbce34337b
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ private predicate loopConditionAlwaysUponEntry(ControlFlowNode loop, Expr condit
* should be in this relation.
*/
pragma[noinline]
private predicate isFunction(Element el) {
el instanceof Function
private predicate isFunction(@element el) {
el instanceof @function
or
el.(Expr).getParent() = el
}
Expand All @@ -122,7 +122,7 @@ private predicate isFunction(Element el) {
*/
pragma[noopt]
private predicate callHasNoTarget(@funbindexpr fc) {
exists(Function f |
exists(@function f |
funbind(fc, f) and
not isFunction(f)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ private predicate isGlobalWithMangledNameAndWithoutDefinition(@mangledname name,
* a unique global variable `complete` with the same name that does have a definition.
*/
private predicate hasTwinWithDefinition(@globalvariable incomplete, @globalvariable complete) {
not variable_instantiation(incomplete, complete) and
exists(@mangledname name |
not variable_instantiation(incomplete, complete) and
isGlobalWithMangledNameAndWithoutDefinition(name, incomplete) and
isGlobalWithMangledNameAndWithDefinition(name, complete)
)
Expand Down
0