Skip to content

Comments

[c2cpg] Added fullname uniqueness for type decls, bindings, and namespace blocks#5394

Merged
max-leuthaeuser merged 7 commits intomasterfrom
max/fullnameUniqueness
Mar 26, 2025
Merged

[c2cpg] Added fullname uniqueness for type decls, bindings, and namespace blocks#5394
max-leuthaeuser merged 7 commits intomasterfrom
max/fullnameUniqueness

Conversation

@max-leuthaeuser
Copy link
Contributor

@max-leuthaeuser max-leuthaeuser commented Mar 25, 2025

No description provided.

@max-leuthaeuser max-leuthaeuser requested a review from maltek March 25, 2025 19:04
@max-leuthaeuser max-leuthaeuser changed the title [c2cpg] Added fullname uniqueness for type decls and namespace blocks [c2cpg] Added fullname uniqueness for type decls, bindings, and namespace blocks Mar 26, 2025
Copy link
Contributor

@maltek maltek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to caution that we need to preserve the links from a class with forward-declared member functions (usually in header files) to the implementations of those functions (usually not in headers). But I can't actually find any such links (e.g. method bindings) as of yet. So we'll just have to be careful about all that once we implement it.

class A {
    int foo();
}
#include "a.hpp"

int A::foo() {
    return 1;
}

@max-leuthaeuser
Copy link
Contributor Author

I was going to caution that we need to preserve the links from a class with forward-declared member functions

We never create methods or bindings for forward-declared methods if we encounter an actual implementation later on.

@maltek
Copy link
Contributor

maltek commented Mar 26, 2025

We never create methods or bindings for forward-declared methods if we encounter an actual implementation later on.

Yes, that's what I was trying to say. We should at some point (once we also emit proper dynamic calls), but that's for another PR.

@max-leuthaeuser max-leuthaeuser merged commit aa239f6 into master Mar 26, 2025
6 checks passed
@max-leuthaeuser max-leuthaeuser deleted the max/fullnameUniqueness branch March 26, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants