summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Parse/Parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Parse/Parser.h')
-rw-r--r--clang/include/clang/Parse/Parser.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index cd63b9951c8..83ec0a7a8c2 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -51,6 +51,11 @@ class Parser {
enum { ScopeCacheSize = 16 };
unsigned NumCachedScopes;
Scope *ScopeCache[ScopeCacheSize];
+
+ /// Ident_super - IdentifierInfo for "super", to support fast
+ /// comparison.
+ IdentifierInfo *Ident_super;
+
public:
Parser(Preprocessor &PP, Action &Actions);
~Parser();
@@ -434,7 +439,7 @@ private:
if (Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope))
return true;
- return Tok.isNamedIdentifier("super");
+ return Tok.getIdentifierInfo() == Ident_super;
}
ExprResult ParseObjCAtExpression(SourceLocation AtLocation);
OpenPOWER on IntegriCloud