| Issue |
56474
|
| Summary |
[debug-info] Should constructor homing not suppress types for empty default constructors?
|
| Labels |
|
| Assignees |
|
| Reporter |
jmorse
|
Using a recent clang (02d6950d844db0), consider this code:
class foo
{
public:
foo() {}
public:
float bar;
};
float cheese(foo *baz) {
return baz->bar;
}
With constructor homing enabled, clang does not emit full type information for `foo`, because there's no call to the constructor. However, if you delete the declaration of the default-constructor, then it does!
I find this moderately unintuitive, because there's no functional change to the behaviour of the code, but there's substantially different debug-info being generated. It's not clear to me whether it's a bug though: a possible explanation is that the implicit default-constructor won't get a function symbol, therefore it doesn't qualify for constructor homing in a translation unit? This very much isn't my area of experience, so paging @dwblaikie and co, is this an expected behaviour of constructor homing?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs