aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-12 06:22:50 +0000
committerChris Lattner <sabre@nondot.org>2010-04-12 06:22:50 +0000
commitc987a4107c73308c58832beb1dc9709e7a3285c0 (patch)
treeedb2cc4729fac8146c1f603c9862251e6d5c8d8e /lib
parent236beabc78c2998dbd0e45d952a3ca16f23134c7 (diff)
use pointer comparison instead of isStr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Parse/ParseExpr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index a29ea81f76..d1686a183e 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -641,7 +641,7 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression,
if (getLang().ObjC1 && Tok.is(tok::period) &&
(Actions.getTypeName(II, ILoc, CurScope) ||
// Allow the base to be 'super' if in an objc-method.
- (II.isStr("super") && CurScope->isInObjcMethodScope()))) {
+ (&II == Ident_super && CurScope->isInObjcMethodScope()))) {
SourceLocation DotLoc = ConsumeToken();
if (Tok.isNot(tok::identifier)) {
@@ -1442,10 +1442,9 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
return OwningExprResult(Actions);
}
-
// Reject the cast of super idiom in ObjC.
if (Tok.is(tok::identifier) && getLang().ObjC1 &&
- Tok.getIdentifierInfo()->isStr("super")) {
+ Tok.getIdentifierInfo() == Ident_super) {
Diag(Tok.getLocation(), diag::err_illegal_super_cast)
<< SourceRange(OpenLoc, RParenLoc);
return ExprError();