diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-26 21:51:07 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-26 21:51:07 +0000 |
commit | 44802cc435d5122701e4f1a9354381cff4b171c0 (patch) | |
tree | 6f71f0c701282b6df9cbc480b2e6e7668c0200b8 /lib/Parse/Parser.cpp | |
parent | 4bdd91c09fd59e0c154d759288beff300e31e1d0 (diff) |
Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index ec07b42319..42d95e7f02 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -700,6 +700,15 @@ Parser::ExprResult Parser::ParseSimpleAsm() { /// This simplifies handling of C++ scope specifiers and allows efficient /// backtracking without the need to re-parse and resolve nested-names and /// typenames. +/// It will mainly be called when we expect to treat identifiers as typenames +/// (if they are typenames). For example, in C we do not expect identifiers +/// inside expressions to be treated as typenames so it will not be called +/// for expressions in C. +/// The benefit for C/ObjC is that a typename will be annotated and +/// Actions.isTypeName will not be needed to be called again (e.g. isTypeName +/// will not be called twice, once to check whether we have a declaration +/// specifier, and another one to get the actual type inside +/// ParseDeclarationSpecifiers). void Parser::TryAnnotateTypeOrScopeToken() { if (Tok.is(tok::annot_qualtypename) || Tok.is(tok::annot_cxxscope)) return; |