mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Bug 494359 - Explicit specialization is improperly ignored
Test case. Change-Id: I9eb34ad4d3309bf568d26338bd7611fa9fea0673
This commit is contained in:
parent
b6a6331fb2
commit
3d94e24317
2 changed files with 40 additions and 0 deletions
|
@ -388,6 +388,7 @@ public abstract class IndexBindingResolutionTestBase extends BaseTestCase {
|
||||||
static protected class NameCollector extends ASTVisitor {
|
static protected class NameCollector extends ASTVisitor {
|
||||||
{
|
{
|
||||||
shouldVisitNames = true;
|
shouldVisitNames = true;
|
||||||
|
shouldVisitImplicitNames = true;
|
||||||
}
|
}
|
||||||
public List<IASTName> nameList = new ArrayList<>();
|
public List<IASTName> nameList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
|
@ -124,4 +124,43 @@ public class IndexMultiFileTest extends IndexBindingResolutionTestBase {
|
||||||
public void testNamespace_481161() throws Exception {
|
public void testNamespace_481161() throws Exception {
|
||||||
checkBindings();
|
checkBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A.h
|
||||||
|
// #include "B.h"
|
||||||
|
//
|
||||||
|
// template <typename T, typename U>
|
||||||
|
// struct A {
|
||||||
|
// A(D<U> p);
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// template <>
|
||||||
|
// struct A<B, C> {
|
||||||
|
// A(D<C> p);
|
||||||
|
// };
|
||||||
|
|
||||||
|
// B.h
|
||||||
|
// struct B {};
|
||||||
|
//
|
||||||
|
// struct C {};
|
||||||
|
//
|
||||||
|
// template <typename T>
|
||||||
|
// struct D {};
|
||||||
|
|
||||||
|
// C.h
|
||||||
|
// class B;
|
||||||
|
|
||||||
|
// confuser.cpp
|
||||||
|
// #include "B.h"
|
||||||
|
|
||||||
|
// test.cpp *
|
||||||
|
// #include "A.h"
|
||||||
|
// #include "C.h"
|
||||||
|
//
|
||||||
|
// void test() {
|
||||||
|
// D<C> x;
|
||||||
|
// new A<B, C>(x);
|
||||||
|
// }
|
||||||
|
public void testExplicitSpecialization_494359() throws Exception {
|
||||||
|
checkBindings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue