mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Bug 553141 - Fix logic error in TypeInstantiationRequest.equals()
Change-Id: Ie458f44a4384233ef96ed18e46f38fde309c7399
This commit is contained in:
parent
ac7d473351
commit
7e267a4791
2 changed files with 34 additions and 1 deletions
|
@ -75,4 +75,37 @@ public class TemplateAutoTests extends AST2CPPTestBase {
|
||||||
public void testTemplateNontypeParameterTypeDeductionParsing_519361_3() throws Exception {
|
public void testTemplateNontypeParameterTypeDeductionParsing_519361_3() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// template <typename T, T>
|
||||||
|
// struct meta { using type = int; };
|
||||||
|
//
|
||||||
|
// template <typename T>
|
||||||
|
// struct remove_noexcept { using type = T; };
|
||||||
|
//
|
||||||
|
// template <typename T>
|
||||||
|
// using remove_noexcept_t = typename remove_noexcept<T>::type;
|
||||||
|
//
|
||||||
|
// template <auto Key>
|
||||||
|
// struct K : meta<remove_noexcept_t<decltype(Key)>,Key>{};
|
||||||
|
//
|
||||||
|
// template <auto Key>
|
||||||
|
// struct W {
|
||||||
|
// using type = typename K<Key>::type;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// template <typename T>
|
||||||
|
// struct M {};
|
||||||
|
//
|
||||||
|
// struct A {
|
||||||
|
// int foo;
|
||||||
|
// };
|
||||||
|
// typedef M<W<&A::foo>::type> M1; // typedef #1
|
||||||
|
//
|
||||||
|
// struct B {
|
||||||
|
// int foo;
|
||||||
|
// };
|
||||||
|
// typedef M<W<&B::foo>::type> M2; // typedef #2
|
||||||
|
public void testInstantiationCacheConflict_553141() throws Exception {
|
||||||
|
parseAndCheckBindings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class TypeInstantiationRequest {
|
||||||
return true;
|
return true;
|
||||||
if (type1 == null || type2 == null)
|
if (type1 == null || type2 == null)
|
||||||
return false;
|
return false;
|
||||||
return type1.isSameType(type1);
|
return type1.isSameType(type2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean equals(ICPPTemplateParameterMap map1, ICPPTemplateParameterMap map2) {
|
private boolean equals(ICPPTemplateParameterMap map1, ICPPTemplateParameterMap map2) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue