mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Bug 488611 - Overloaded pointer-to-member operator
Change-Id: I16dfaa0d91fbc703e2cde014b62578c168e48716
This commit is contained in:
parent
36be245004
commit
e41a1c30eb
2 changed files with 14 additions and 1 deletions
|
@ -4671,6 +4671,19 @@ public class AST2CPPTests extends AST2TestBase {
|
||||||
ICPPASTPointerToMember po = (ICPPASTPointerToMember) d.getPointerOperators()[0];
|
ICPPASTPointerToMember po = (ICPPASTPointerToMember) d.getPointerOperators()[0];
|
||||||
assertEquals("X::", po.getName().toString());
|
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 B {};
|
||||||
// struct D : B {};
|
// struct D : B {};
|
||||||
|
|
|
@ -176,7 +176,7 @@ public enum OverloadableOperator {
|
||||||
switch (binaryOp) {
|
switch (binaryOp) {
|
||||||
case IASTBinaryExpression.op_binaryAnd: return AMPER;
|
case IASTBinaryExpression.op_binaryAnd: return AMPER;
|
||||||
case IASTBinaryExpression.op_binaryAndAssign: return AMPERASSIGN;
|
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_binaryOr: return BITOR;
|
||||||
case IASTBinaryExpression.op_binaryOrAssign: return BITORASSIGN;
|
case IASTBinaryExpression.op_binaryOrAssign: return BITORASSIGN;
|
||||||
case IASTBinaryExpression.op_shiftLeft: return SHIFTL;
|
case IASTBinaryExpression.op_shiftLeft: return SHIFTL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue