diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-06-17 22:40:22 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-06-17 22:40:22 +0000 |
| commit | fb4330f255e5db564855ffbc0a34b335ff930a0f (patch) | |
| tree | 05ec85921e8c01de6029e963468459a66c1e03f5 /clang/lib/Sema/SemaExpr.cpp | |
| parent | b35e2caab5a9c62ec4ce7f6660766ef4b9670551 (diff) | |
| download | bcm5719-llvm-fb4330f255e5db564855ffbc0a34b335ff930a0f.tar.gz bcm5719-llvm-fb4330f255e5db564855ffbc0a34b335ff930a0f.zip | |
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.
Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).
This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).
No functionality change.
llvm-svn: 73649
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index ab12cff3afb..672e487a34f 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1969,13 +1969,13 @@ static Decl *FindGetterNameDeclFromProtocolList(const ObjCProtocolDecl*PDecl, return 0; } -static Decl *FindGetterNameDecl(const ObjCQualifiedIdType *QIdTy, +static Decl *FindGetterNameDecl(const ObjCObjectPointerType *QIdTy, IdentifierInfo &Member, const Selector &Sel, ASTContext &Context) { // Check protocols on qualified interfaces. Decl *GDecl = 0; - for (ObjCQualifiedIdType::qual_iterator I = QIdTy->qual_begin(), + for (ObjCObjectPointerType::qual_iterator I = QIdTy->qual_begin(), E = QIdTy->qual_end(); I != E; ++I) { if (ObjCPropertyDecl *PD = (*I)->FindPropertyDeclaration(Context, &Member)) { GDecl = PD; @@ -1988,7 +1988,7 @@ static Decl *FindGetterNameDecl(const ObjCQualifiedIdType *QIdTy, } } if (!GDecl) { - for (ObjCQualifiedIdType::qual_iterator I = QIdTy->qual_begin(), + for (ObjCObjectPointerType::qual_iterator I = QIdTy->qual_begin(), E = QIdTy->qual_end(); I != E; ++I) { // Search in the protocol-qualifier list of current protocol. GDecl = FindGetterNameDeclFromProtocolList(*I, Member, Sel, Context); @@ -2313,7 +2313,7 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc, << &Member << BaseType); } // Handle properties on qualified "id" protocols. - const ObjCQualifiedIdType *QIdTy; + const ObjCObjectPointerType *QIdTy; if (OpKind == tok::period && (QIdTy = BaseType->getAsObjCQualifiedIdType())) { // Check protocols on qualified interfaces. Selector Sel = PP.getSelectorTable().getNullarySelector(&Member); |

