1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Don't attempt overload resolution for unknown functions.

This commit is contained in:
Markus Schorn 2009-01-27 17:57:32 +00:00
parent 3feca4f34f
commit c0b169fb8c
2 changed files with 16 additions and 0 deletions

View file

@ -3689,4 +3689,17 @@ public class AST2TemplateTests extends AST2BaseTest {
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
bh.assertNonProblem("substr(0)", 6, ICPPMethod.class);
}
// class C {};
// template<typename T> class XT {
// T field;
// void bla() {
// C c;
// field.m(c);
// }
// };
public void testResolutionOfUnknownFunctions() throws Exception {
String code= getAboveComment();
parseAndCheckBindings(code, ParserLanguage.CPP);
}
}

View file

@ -2006,6 +2006,9 @@ public class CPPSemantics {
if (++viableCount == 1) {
firstViable= f;
}
if (f instanceof ICPPUnknownBinding) {
return f;
}
}
}
if (firstViable == null)