diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index c0307919e54..b1f5f80b0a0 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -8980,4 +8980,16 @@ public class AST2TemplateTests extends AST2TestBase { public void testRecursiveTemplateClass_484786() throws Exception { parseAndCheckBindings(); } + + // template + // struct S { + // static const bool value = true; + // }; + // + // typedef int Int; + // + // void waldo() noexcept(S::value) {} + public void testDisambiguationInNoexceptSpecifier_467332() throws Exception { + parseAndCheckBindings(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java index 9282028e468..53fe209c5bb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java @@ -314,6 +314,12 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS } } } + if (child == noexceptExpression) { + other.setPropertyInParent(child.getPropertyInParent()); + other.setParent(child.getParent()); + noexceptExpression = (ICPPASTExpression) other; + return; + } assert false; }