diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-12 06:22:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-12 06:22:50 +0000 |
commit | 14471365538696cedb502bc097bbfc3ca45a93a0 (patch) | |
tree | 480a5348e704dba4cf7090404eba5382c9c60298 /clang/lib/Parse | |
parent | cd963185f07bbbc61c660da8bb4c1264b571faec (diff) | |
download | bcm5719-llvm-14471365538696cedb502bc097bbfc3ca45a93a0.tar.gz bcm5719-llvm-14471365538696cedb502bc097bbfc3ca45a93a0.zip |
use pointer comparison instead of isStr
llvm-svn: 101022
Diffstat (limited to 'clang/lib/Parse')
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index a29ea81f761..d1686a183e3 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/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(); |