This patch 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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM, thks.
(See one inline comment to fix though)
lib/AST/DeclObjC.cpp | ||
---|---|---|
841 | Either you should use dyn_cast, or you should just cast but without a if |
lib/AST/DeclObjC.cpp | ||
---|---|---|
841 | Thanks! Yeah, this is supposed to be dyn_cast. |
Comment Actions
I managed to get rid of the extra function and simplify the check thanks to suggestions from Erik.
Either you should use dyn_cast, or you should just cast but without a if