summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/Sema.cpp2
-rw-r--r--clang/lib/Sema/Sema.h3
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp2
4 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 1a9e1a062c3..dcb3af31b08 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -103,8 +103,6 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer)
KnownFunctionIDs[id_vsnprintf_chk] = &IT.get("__builtin___vsnprintf_chk");
KnownFunctionIDs[id_vprintf] = &IT.get("vprintf");
- SuperID = &IT.get("super");
-
// ObjC builtin typedef names.
Ident_id = &IT.get("id");
Ident_Class = &IT.get("Class");
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index ded90e8103d..db75513b1a5 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -192,9 +192,6 @@ public:
/// This list is populated upon the creation of a Sema object.
IdentifierInfo* KnownFunctionIDs[id_num_known_functions];
- /// SuperID - Identifier for "super" used for Objective-C checking.
- IdentifierInfo* SuperID;
-
/// Identifiers for builtin ObjC typedef names.
IdentifierInfo *Ident_id, *Ident_Class; // "id", "Class"
IdentifierInfo *Ident_SEL, *Ident_Protocol; // "SEL", "Protocol"
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 147b4c8323d..12f059e11ac 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -400,7 +400,7 @@ Sema::ExprResult Sema::ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc,
}
}
// Needed to implement property "super.method" notation.
- if (SD == 0 && II == SuperID) {
+ if (SD == 0 && II->isStr("super")) {
QualType T = Context.getPointerType(Context.getObjCInterfaceType(
getCurMethodDecl()->getClassInterface()));
return new ObjCSuperExpr(Loc, T);
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index 786d74c9507..0684674c350 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -185,7 +185,7 @@ Sema::ExprResult Sema::ActOnClassMessage(
ObjCInterfaceDecl* ClassDecl = 0;
bool isSuper = false;
- if (receiverName == SuperID) {
+ if (receiverName->isStr("super")) {
if (getCurMethodDecl()) {
isSuper = true;
ClassDecl = getCurMethodDecl()->getClassInterface()->getSuperClass();
OpenPOWER on IntegriCloud