1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 488611 - Overloaded pointer-to-member operator

Change-Id: I16dfaa0d91fbc703e2cde014b62578c168e48716
This commit is contained in:
Nathan Ridge 2016-03-25 00:02:20 -04:00
parent 36be245004
commit e41a1c30eb
2 changed files with 14 additions and 1 deletions

View file

@ -4671,6 +4671,19 @@ public class AST2CPPTests extends AST2TestBase {
ICPPASTPointerToMember po = (ICPPASTPointerToMember) d.getPointerOperators()[0];
assertEquals("X::", po.getName().toString());
}
// struct cat {
// void meow();
// };
// struct waldo {
// cat operator->*(bool);
// };
// void foo() {
// (waldo()->*true).meow(); // Method 'meow' could not be resolved
// }
public void testOverloadedPointerToMemberOperator_488611() throws Exception {
parseAndCheckBindings();
}
// struct B {};
// struct D : B {};

View file

@ -176,7 +176,7 @@ public enum OverloadableOperator {
switch (binaryOp) {
case IASTBinaryExpression.op_binaryAnd: return AMPER;
case IASTBinaryExpression.op_binaryAndAssign: return AMPERASSIGN;
case IASTBinaryExpression.op_pmarrow: return ARROW;
case IASTBinaryExpression.op_pmarrow: return ARROWSTAR;
case IASTBinaryExpression.op_binaryOr: return BITOR;
case IASTBinaryExpression.op_binaryOrAssign: return BITORASSIGN;
case IASTBinaryExpression.op_shiftLeft: return SHIFTL;