1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

Bug 273252 - Fix global scope check for C

Change-Id: Id2f43e0f89b80f06ce9a3b7035c4ba6f84a8cc1f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
This commit is contained in:
Marco Stornelli 2020-01-18 09:37:44 +01:00
parent cc466a2e49
commit 471a49f379

View file

@ -40,7 +40,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariableInstance;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.index.IIndexName;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalVariable;
import org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPGlobalScope;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMGlobalScope;
import org.eclipse.core.runtime.CoreException;
@SuppressWarnings("restriction")
@ -141,7 +141,7 @@ public class SymbolShadowingChecker extends AbstractIndexAstChecker {
if (scope.getKind() != EScopeKind.eLocal)
return PROCESS_CONTINUE;
scope = scope.getParent();
while (scope != null && !(scope instanceof IProblemBinding) && !(scope instanceof PDOMCPPGlobalScope)) {
while (scope != null && !(scope instanceof IProblemBinding) && !(scope instanceof PDOMGlobalScope)) {
IBinding[] scopeBindings = scope.find(declarator.getName().toString(),
declarator.getTranslationUnit());