mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-21 18:54:02 +00:00
Add more test coverage for D77598
Add coverage to demonstrate why including the type of template parameters is necessary to disambiguate function template specializations. Test courtesy of Richard Smith
This commit is contained in:
parent
b2589e326b
commit
50fdd7df82
@ -93,3 +93,14 @@ void test() {
|
||||
// CHECK1: {{^ }}template<> struct foo<1, 0 + 0L> {
|
||||
template struct foo<1, 0 + 0L>;
|
||||
}
|
||||
|
||||
namespace test5 {
|
||||
template<long> void f() {}
|
||||
void (*p)() = f<0>;
|
||||
template<unsigned = 0> void f() {}
|
||||
void (*q)() = f<>;
|
||||
// Not perfect - this code in the dump would be ambiguous, but it's the best we
|
||||
// can do to differentiate these two implicit specializations.
|
||||
// CHECK1: template<> void f<0L>()
|
||||
// CHECK1: template<> void f<0U>()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user