mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +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:
parent
cc466a2e49
commit
471a49f379
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue