diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-01-24 23:29:36 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-01-24 23:29:36 +0000 |
commit | 8edef7c31d27fc9d5d163660702a8a7730a0d19f (patch) | |
tree | 46f419050676ce6c571d9bca2a1775ba1f66ef6e /lib/Parse/ParseTentative.cpp | |
parent | dca2b7314f73fbb1e897befdc4f0ddaa9905d72c (diff) |
Make tentative parsing of pointer-to-member decls work, and fix other stuff pointed out by Doug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index a7c3e38931..e7914cccea 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -357,7 +357,7 @@ bool Parser::isCXXTypeIdInParens() { /// '*' cv-qualifier-seq[opt] /// '&' /// [C++0x] '&&' [TODO] -/// '::'[opt] nested-name-specifier '*' cv-qualifier-seq[opt] [TODO] +/// '::'[opt] nested-name-specifier '*' cv-qualifier-seq[opt] /// /// cv-qualifier-seq: /// cv-qualifier cv-qualifier-seq[opt] @@ -387,8 +387,12 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, // ptr-operator declarator while (1) { - if (Tok.is(tok::star) || Tok.is(tok::amp) || - (Tok.is(tok::caret) && getLang().Blocks)) { + if (Tok.is(tok::coloncolon) || Tok.is(tok::identifier)) + TryAnnotateCXXScopeToken(); + + if (Tok.is(tok::star) || Tok.is(tok::amp) || + (Tok.is(tok::caret) && getLang().Blocks) || + (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) { // ptr-operator ConsumeToken(); while (Tok.is(tok::kw_const) || |