-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Closed
Copy link
Labels
ABIApplication Binary InterfaceApplication Binary Interfacelibc++abilibc++abi C++ Runtime Library. Not libc++.libc++abi C++ Runtime Library. Not libc++.llvmUmbrella label for LLVM issuesUmbrella label for LLVM issues
Description
While fiddling with the LLVM demangler, I noticed that in the following example
template <typename T>
struct Bar{};
template <typename K>
struct Foo {
template <typename T, template<typename U> typename S>
void method(S<T> t, S<K> k);
};
void s() {
Foo<int> k;
Bar<int> i;
Bar<bool> b;
k.method(b, i);
}
the call k.method(b, i)
is mangled as _ZN3FooIiE6methodIb3BarEEvT0_IT_ES3_IiE
, which appears right (Foo<int>::method<bool, Bar>(Bar<bool>, Bar<int>)
).
However, running the demangler
llvm-cxxfilt -n _ZN3FooIiE6methodIb3BarEEvT0_IT_ES3_IiE
produces void Foo<int>::method<bool, Bar>(Bar<bool>, bool<int>)
.
bool<int>
is obviously wrong and seems to stem from the S3_
substitution.
Metadata
Metadata
Assignees
Labels
ABIApplication Binary InterfaceApplication Binary Interfacelibc++abilibc++abi C++ Runtime Library. Not libc++.libc++abi C++ Runtime Library. Not libc++.llvmUmbrella label for LLVM issuesUmbrella label for LLVM issues