diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-13 14:20:00 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-13 14:37:32 +0200 |
commit | bcadd5b5a782df21f6aa580a0c07736abded519c (patch) | |
tree | 6be480f853a28ec59e0502f0dce44bdb81ad7ab7 /src/shared/cplusplus/Bind.cpp | |
parent | b51ebdd1a9004e93beaba89af6017c8134b570b7 (diff) | |
download | qt-creator-bcadd5b5a782df21f6aa580a0c07736abded519c.tar.gz |
Process ObjC forward class declarations
Diffstat (limited to 'src/shared/cplusplus/Bind.cpp')
-rw-r--r-- | src/shared/cplusplus/Bind.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp index 84bc3b3786..12a2b41d0d 100644 --- a/src/shared/cplusplus/Bind.cpp +++ b/src/shared/cplusplus/Bind.cpp @@ -2020,16 +2020,26 @@ bool Bind::visit(UsingDirectiveAST *ast) bool Bind::visit(ObjCClassForwardDeclarationAST *ast) { - FullySpecifiedType type; + FullySpecifiedType declSpecifiers; for (SpecifierListAST *it = ast->attribute_list; it; it = it->next) { - type = this->specifier(it->value, type); + declSpecifiers = this->specifier(it->value, declSpecifiers); } + + List<ObjCForwardClassDeclaration *> **symbolTail = &ast->symbols; + // unsigned class_token = ast->class_token; for (NameListAST *it = ast->identifier_list; it; it = it->next) { - /*const Name *value =*/ this->name(it->value); + const Name *name = this->name(it->value); + + const unsigned sourceLocation = it->value ? it->value->firstToken() : ast->firstToken(); + ObjCForwardClassDeclaration *fwd = control()->newObjCForwardClassDeclaration(sourceLocation, name); + setDeclSpecifiers(fwd, declSpecifiers); + _scope->addMember(fwd); + + *symbolTail = new (translationUnit()->memoryPool()) List<ObjCForwardClassDeclaration *>(fwd); + symbolTail = &(*symbolTail)->next; } - // unsigned semicolon_token = ast->semicolon_token; - // List<ObjCForwardClassDeclaration *> *symbols = ast->symbols; + return false; } |