Issue 134549
Summary DebugInfo: preferred_name causes DIDerivedType node to be emitted twice
Labels debuginfo
Assignees
Reporter mizvekov
    This is a problem isolated from one of our own test cases: `clang/test/CodeGen/preferred_name.cpp`
The test expectation captures this, but there is no acknowledgement the bug exists.

Reduced repro: https://godbolt.org/z/dn9hs87ev
```C++
template <class T> struct Foo;
template <class T> using Bar = Foo<T>;

template <class T>
struct [[clang::preferred_name(Bar<short>)]] Foo {};

Bar<short> barShort;
```

Reduced output:
```
!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "Bar<short>", file: !5, line: 2, baseType: !7)
!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "Bar<short>", file: !5, line: 2, baseType: !8)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to