From 56f755efe8f5c367b284347c73b9221ca0160de1 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 20 Oct 2009 12:47:54 +0200 Subject: Changed ObjC context keyword comparison to use identifiers. --- src/shared/cplusplus/CheckDeclaration.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/shared/cplusplus/CheckDeclaration.cpp') diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp index 5a0142f384..6a81784360 100644 --- a/src/shared/cplusplus/CheckDeclaration.cpp +++ b/src/shared/cplusplus/CheckDeclaration.cpp @@ -700,26 +700,26 @@ bool CheckDeclaration::visit(ObjCPropertyDeclarationAST *ast) if (!attrAst) continue; - const char *attrName = spell(attrAst->attribute_identifier_token); - if (!strcmp("getter", attrName)) { + Identifier *attrId = identifier(attrAst->attribute_identifier_token); + if (attrId == control()->objcGetterId()) { if (checkPropertyAttribute(attrAst, propAttrs, Getter)) { // TODO: find method declaration for getter } - } else if (!strcmp("setter", attrName)) { + } else if (attrId == control()->objcSetterId()) { if (checkPropertyAttribute(attrAst, propAttrs, Setter)) { // TODO: find method declaration for setter } - } else if (!strcmp("readwrite", attrName)) { + } else if (attrId == control()->objcReadwriteId()) { checkPropertyAttribute(attrAst, propAttrs, ReadWrite); - } else if (!strcmp("readonly", attrName)) { + } else if (attrId == control()->objcReadonlyId()) { checkPropertyAttribute(attrAst, propAttrs, ReadOnly); - } else if (!strcmp("assign", attrName)) { + } else if (attrId == control()->objcAssignId()) { checkPropertyAttribute(attrAst, propAttrs, Assign); - } else if (!strcmp("retain", attrName)) { + } else if (attrId == control()->objcRetainId()) { checkPropertyAttribute(attrAst, propAttrs, Retain); - } else if (!strcmp("copy", attrName)) { + } else if (attrId == control()->objcCopyId()) { checkPropertyAttribute(attrAst, propAttrs, Copy); - } else if (!strcmp("nonatomic", attrName)) { + } else if (attrId == control()->objcNonatomicId()) { checkPropertyAttribute(attrAst, propAttrs, NonAtomic); } } -- cgit v1.2.1