mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 395247 - Error involving variadic constructor
Change-Id: Ia5f911e0a80a5372943a505b814c333c53a5a602 Reviewed-on: https://git.eclipse.org/r/9061 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
66bb47cde0
commit
bb97b889b2
3 changed files with 17 additions and 2 deletions
|
@ -6897,7 +6897,7 @@ public class AST2TemplateTests extends AST2BaseTest {
|
|||
// struct Cat {};
|
||||
// typedef S<is_convertible<Cat>::value>::type T;
|
||||
public void testDependentExpressionInvolvingField_388623() throws Exception {
|
||||
parseAndCheckBindings(getAboveComment(), CPP, true);
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
|
||||
// struct S {
|
||||
|
@ -6911,4 +6911,16 @@ public class AST2TemplateTests extends AST2BaseTest {
|
|||
public void testSFINAEInDefaultArgument() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
|
||||
// template <typename>
|
||||
// struct M {
|
||||
// template <typename... Args>
|
||||
// M(Args...);
|
||||
// };
|
||||
// void foo() {
|
||||
// new M<int>((int*)0, 0);
|
||||
// }
|
||||
public void testVariadicConstructor_395247() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -417,6 +417,9 @@ public class CPPSemantics {
|
|||
if (cls instanceof ICPPUnknownBinding) {
|
||||
binding= new CPPUnknownConstructor(cls);
|
||||
} else {
|
||||
// Do not interpret template arguments to a template class as being
|
||||
// explicit template arguments to its templated constructor.
|
||||
data.fTemplateArguments = null;
|
||||
binding= CPPSemantics.resolveFunction(data, ClassTypeHelper.getConstructors(cls, lookupPoint), true);
|
||||
}
|
||||
} catch (DOMException e) {
|
||||
|
|
|
@ -79,7 +79,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
|||
* Context data for IASTName lookup
|
||||
*/
|
||||
public class LookupData extends ScopeLookupData {
|
||||
final public ICPPTemplateArgument[] fTemplateArguments;
|
||||
public ICPPTemplateArgument[] fTemplateArguments;
|
||||
public Map<ICPPNamespaceScope, List<ICPPNamespaceScope>> usingDirectives= Collections.emptyMap();
|
||||
|
||||
/** Used to ensure we don't visit things more than once. */
|
||||
|
|
Loading…
Add table
Reference in a new issue