Switch sema to maintaining its own scope chain information for variable
shadowing, instead of threading it through the AST. This patch contributed
by Argiris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 8d09727..1276450 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -63,8 +63,7 @@
ParmVarDecl *PDecl = MDecl->getParamDecl(i);
IdentifierInfo *II = PDecl->getIdentifier();
if (II) {
- PDecl->setNext(II->getFETokenInfo<ScopedDecl>());
- II->setFETokenInfo(PDecl);
+ IdResolver.AddDecl(PDecl, FnBodyScope);
FnBodyScope->AddDecl(PDecl);
}
}
@@ -926,3 +925,5 @@
return PDecl;
}
+
+