diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java index a2ee13bb1e4..88ebf62b96b 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java @@ -10442,4 +10442,29 @@ public class AST2CPPTests extends AST2TestBase { assertNotNull(bindings); assertEquals(1, bindings.length); } + + // struct Test { + // operator char* &(); + // + // void test(char) { + // Test a; + // test(*a); + // } + // }; + public void testBuiltInOperator_423396() throws Exception { + parseAndCheckBindings(); + } + + // struct Test { + // typedef void (*TypeFunc)(char); + // operator TypeFunc* &(); + // + // void test(TypeFunc) { + // Test a; + // test(*a); + // } + // }; + public void testBuiltInOperatorFunctionType_423396() throws Exception { + parseAndCheckBindings(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java index f265c57a3bc..8e671402479 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java @@ -274,7 +274,7 @@ class BuiltinOperators { private void opDeref() { IType[] types= getClassConversionTypes(FIRST); for (IType type : types) { - type= SemanticUtil.getNestedType(type, TDEF); + type= SemanticUtil.getNestedType(type, TDEF|REF); if (isPointer(type)) { IType nested= SemanticUtil.getNestedType(((IPointerType) type).getType(), TDEF); if (nested instanceof ICPPFunctionType) {