summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckName.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-11-11 09:21:06 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-11-11 09:21:06 +0100
commit72d4493fc21535f1f2720106e28ae3a6980851f5 (patch)
tree5bbd70967e7fd1e692c3cbfed9f389269025b9e3 /src/shared/cplusplus/CheckName.cpp
parent7938f9def974898bb8d05e98c4b59d983a887d79 (diff)
downloadqt-creator-72d4493fc21535f1f2720106e28ae3a6980851f5.tar.gz
Added scope calculation for Objective-C classes.
Diffstat (limited to 'src/shared/cplusplus/CheckName.cpp')
-rw-r--r--src/shared/cplusplus/CheckName.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/cplusplus/CheckName.cpp b/src/shared/cplusplus/CheckName.cpp
index d3a9c2b244..6476b3295f 100644
--- a/src/shared/cplusplus/CheckName.cpp
+++ b/src/shared/cplusplus/CheckName.cpp
@@ -379,8 +379,9 @@ bool CheckName::visit(TemplateIdAST *ast)
bool CheckName::visit(ObjCSelectorWithoutArgumentsAST *ast)
{
std::vector<Name *> names;
- Identifier *id = identifier(ast->name_token);
- names.push_back(control()->nameId(id));
+ Identifier *id = control()->findOrInsertIdentifier(spell(ast->name_token));
+ NameId *nameId = control()->nameId(id);
+ names.push_back(nameId);
_name = control()->selectorNameId(&names[0], names.size(), false);
ast->selector_name = _name;
@@ -391,10 +392,9 @@ bool CheckName::visit(ObjCSelectorWithArgumentsAST *ast)
{
std::vector<Name *> names;
for (ObjCSelectorArgumentListAST *it = ast->selector_argument_list; it; it = it->next) {
- Identifier *id = identifier(it->value->name_token);
- Name *name = control()->nameId(id);
-
- names.push_back(name);
+ Identifier *id = control()->findOrInsertIdentifier(spell(it->value->name_token));
+ NameId *nameId = control()->nameId(id);
+ names.push_back(nameId);
}
if (!names.empty()) {