]> granicus.if.org Git - clang/commit
[ObjC] Prevent infinite loops when iterating over redeclaration
authorAlex Lorenz <arphaman@gmail.com>
Mon, 21 Nov 2016 11:16:30 +0000 (11:16 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 21 Nov 2016 11:16:30 +0000 (11:16 +0000)
commitdf24b15e7264f982efcf72f4a4b61790afbc49f5
treed96872f3a9f2a58197cce06124e066c3580dbefb
parente960676a0763386aa9c622098df8781709d630db
[ObjC] Prevent infinite loops when iterating over redeclaration
of a method that was declared in an invalid interface

This commit fixes an infinite loop that occurs when clang tries to iterate over
redeclaration of a method that was declared in an invalid @interface. The
existing validity checks don't catch this as that @interface is a duplicate of
a previously declared valid @interface declaration, so we have to verify that
the found redeclaration is in a valid declaration context.

rdar://29220965

Differential Revision: https://reviews.llvm.org/D26664

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287530 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/DeclObjC.cpp
test/SemaObjC/method-redecls-invalid-interface.m [new file with mode: 0644]