[cfe-commits] r101022 - /cfe/trunk/lib/Parse/ParseExpr.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 11 23:22:50 PDT 2010
Author: lattner
Date: Mon Apr 12 01:22:50 2010
New Revision: 101022
URL: http://llvm.org/viewvc/llvm-project?rev=101022&view=rev
Log:
use pointer comparison instead of isStr
Modified:
cfe/trunk/lib/Parse/ParseExpr.cpp
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=101022&r1=101021&r2=101022&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Mon Apr 12 01:22:50 2010
@@ -641,7 +641,7 @@
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 @@
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();
More information about the cfe-commits
mailing list