diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-14 08:02:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-14 08:02:31 +0000 |
commit | 3a919e7110407ae7609bb6edc57aac16a5990661 (patch) | |
tree | 6e270fb759729dcbc37f2a8c6606364d40338d1a /lib/Sema | |
parent | 1e2b3d7c6117d663b69d6a71ba8cb9c616e3ee7f (diff) |
Really protect from infinite loop when there are objc method redeclarations.
Serialization part will come later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index bdf492bbc1..62b4a7c0cc 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -2168,7 +2168,7 @@ void Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, Method->setInvalidDecl(); } else { if (PrevMethod) - Context.setObjCMethodRedeclaration(PrevMethod, Method); + Method->setAsRedeclaration(PrevMethod); InsMap[Method->getSelector()] = Method; /// The following allows us to typecheck messages to "id". AddInstanceMethodToGlobalPool(Method); @@ -2189,7 +2189,7 @@ void Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, Method->setInvalidDecl(); } else { if (PrevMethod) - Context.setObjCMethodRedeclaration(PrevMethod, Method); + Method->setAsRedeclaration(PrevMethod); ClsMap[Method->getSelector()] = Method; /// The following allows us to typecheck messages to "Class". AddFactoryMethodToGlobalPool(Method); |