diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-09 18:21:43 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-09 18:21:43 +0000 |
| commit | ec43022b99cf1bb2ccb46034f69143f84888f0b6 (patch) | |
| tree | 86e97c4ed83be9f66118fbd9f6a95cf2fd03e985 /clang/lib/AST/ASTContext.cpp | |
| parent | c33940b3aaf39f708cb9d91dae5843beb5ba4e04 (diff) | |
| download | bcm5719-llvm-ec43022b99cf1bb2ccb46034f69143f84888f0b6.tar.gz bcm5719-llvm-ec43022b99cf1bb2ccb46034f69143f84888f0b6.zip | |
Warn if class object does not implement qualified
id's protocols. Fixes radar 8154220.
llvm-svn: 110583
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 2c16c073483..7d159269c1b 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4323,10 +4323,10 @@ bool ASTContext::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs, if (ObjCInterfaceDecl *lhsID = lhsOPT->getInterfaceDecl()) { for (ObjCObjectPointerType::qual_iterator I = rhsQID->qual_begin(), E = rhsQID->qual_end(); I != E; ++I) { - // when comparing an id<P> on lhs with a static type on rhs, - // see if static class implements all of id's protocols, directly or - // through its super class and categories. - if (lhsID->ClassImplementsProtocol(*I, true)) { + // when comparing an id<P> on rhs with a static type on lhs, + // static class must implement all of id's protocols directly or + // indirectly through its super class. + if (lhsID->ClassImplementsProtocol(*I, false)) { match = true; break; } |

