aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-14 22:04:54 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-14 22:04:54 +0000
commit662e8b5647adbb1bc9eeceece7b64600cfa87471 (patch)
treefe631b8643530da5b6b9cfd54204323b856e95ea /lib/Sema/SemaExprObjC.cpp
parent72cd17f0a4722e1fa3eb47c08a7aa29aeba16754 (diff)
Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to put the common definition. Perhaps the IdentifierInfos all of these "pseudo-keywords" should be collected into one place (this would KnownFunctionIDs and Objective-C property IDs, for example). Remove Token::isNamedIdentifier. - There isn't a good reason to use strcmp when we have interned strings, and there isn't a good reason to encourage clients to do so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 75546ea903..7c2f45b6db 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -150,7 +150,7 @@ Sema::ExprResult Sema::ActOnClassMessage(
ObjCInterfaceDecl* ClassDecl = 0;
bool isSuper = false;
- if (!strcmp(receiverName->getName(), "super") && getCurMethodDecl()) {
+ if (receiverName == SuperID && getCurMethodDecl()) {
isSuper = true;
ClassDecl = getCurMethodDecl()->getClassInterface()->getSuperClass();
if (!ClassDecl)