diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java index 627c528bc62..64bde4b66dc 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java @@ -13,8 +13,10 @@ package org.eclipse.cdt.internal.index.tests; import junit.framework.TestSuite; +import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IFunction; import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace; @@ -206,4 +208,18 @@ public class IndexBindingResolutionBugs extends IndexBindingResolutionTestBase { IBinding b0= getBindingFromASTName("id(*", 2); IBinding b1= getBindingFromASTName("id(6", 2); } + + + // void func1(void); + + // #include "header.h" + // + // int main(void) + // { + // void* v= func1; + // } + public void testBug181735() throws DOMException { + IBinding b0 = getBindingFromASTName("func1;", 5); + assertTrue(b0 instanceof IFunction); + } } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java index 70e753de960..0715bf60ca3 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java @@ -70,4 +70,17 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase IType returnType= f0.getType().getReturnType(); assertTrue(returnType instanceof IBasicType); } + + // void func1(void); + + // #include "header.h" + // + // int main(void) + // { + // void* v= func1; + // } + public void _testBug181735() throws DOMException { + IBinding b0 = getBindingFromASTName("func1;", 5); + assertTrue(b0 instanceof IFunction); + } }