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:
parent
3feca4f34f
commit
c0b169fb8c
2 changed files with 16 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2006,6 +2006,9 @@ public class CPPSemantics {
|
|||
if (++viableCount == 1) {
|
||||
firstViable= f;
|
||||
}
|
||||
if (f instanceof ICPPUnknownBinding) {
|
||||
return f;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (firstViable == null)
|
||||
|
|
Loading…
Add table
Reference in a new issue