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 | c6d52f5dfb2b6c309dcb33f560e300c4e8eb42e2 (patch) | |
tree | af7acf03c4d159639dff2b21eee63c312e417834 /clang/lib/Parse/ParseTentative.cpp | |
parent | 52cc016f2199922f10d7eb9e9bc0229843ab8051 (diff) | |
download | bcm5719-llvm-c6d52f5dfb2b6c309dcb33f560e300c4e8eb42e2.tar.gz bcm5719-llvm-c6d52f5dfb2b6c309dcb33f560e300c4e8eb42e2.zip |
Make tentative parsing of pointer-to-member decls work, and fix other stuff pointed out by Doug.
llvm-svn: 62944
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index a7c3e389319..e7914cccea0 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/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) || |