1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 00:45:28 +02:00
cdt/core
Igor V. Kovalenko a7bfdd2802
Fix struct declaration introducing name in namespace scope (#587)
When AST is used to resolve binding for class-name and elaborated-type-specifier
is found matching [basic.lookup.elab] rule introducing the class-name, behavior
of CPPSemantics.resolveAmbiguities() is different in presence of index.

If there is no index, CPPVisitor.createBinding() for ICPPASTElaboratedTypeSpecifier
creates binding for class-name as introducing the name. When later lookup finds
this binding all is good because binding is declared before the use site.

If index is available, lookup for class-name fails in AST too but now matching
entry is found in the AST index. When later lookup finds this index binding
CPPSemantics.declaredBefore() returns false because it does not look in
AST index and only checks project index.

To fix this additionally check if ICPPClassType object is in AST index,
as we already do for ICPPConstructor. This way declaredBefore() does almost
the same thing as isReachableFromAst() and lookup succeeds returning the
same binding from index.
2023-12-28 16:41:44 -05:00
..
org.eclipse.cdt.core Fix struct declaration introducing name in namespace scope (#587) 2023-12-28 16:41:44 -05:00
org.eclipse.cdt.core.linux Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.linux.aarch64 Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.linux.ppc64le Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.linux.x86_64 Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.macosx Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.native Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.tests Fix struct declaration introducing name in namespace scope (#587) 2023-12-28 16:41:44 -05:00
org.eclipse.cdt.core.win32 Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.core.win32.x86_64 Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
org.eclipse.cdt.ui Provide viewer filter for absent C/C++ translation unit files 2023-10-20 16:38:05 +01:00
org.eclipse.cdt.ui.tests Clean up Maven build (#662) 2023-12-28 14:35:58 -05:00
pom.xml Prepare repo for 11.5.0 (#633) 2023-12-06 18:48:15 -05:00