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 2b808fa58a9..14929e23c70 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 @@ -9600,4 +9600,13 @@ public class AST2CPPTests extends AST2BaseTest { public void testParentScopeOfCatchHandler_376246() throws Exception { parseAndCheckBindings(); } + + // struct MyClass { + // struct MyException {}; + // void doSomething() throw(MyException); + // }; + // void MyClass::doSomething() throw (MyException) {} + public void testScopeOfExceptionSpecification_377457() throws Exception { + parseAndCheckBindings(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java index a144e5dc880..af69d010bf4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java @@ -982,7 +982,8 @@ public class CPPVisitor extends ASTQueries { node= node.getParent(); } continue; - } else if (prop == ICPPASTFunctionDeclarator.TRAILING_RETURN_TYPE) { + } else if (prop == ICPPASTFunctionDeclarator.TRAILING_RETURN_TYPE || + prop == ICPPASTFunctionDeclarator.EXCEPTION_TYPEID) { IScope result = scopeViaFunctionDtor((ICPPASTFunctionDeclarator) node.getParent()); if (result != null) return result;