diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-03-25 10:26:33 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-03-25 10:44:42 +0100 |
commit | ddcc40d0fcec541e772e59eb78214fb58819c42a (patch) | |
tree | 11a9630ae8335c136678cb28ae814660dfb642b8 /src/shared/cplusplus/Parser.cpp | |
parent | a52b826600a0abb24035d9af2fc92633f9ae3b60 (diff) | |
download | qt-creator-ddcc40d0fcec541e772e59eb78214fb58819c42a.tar.gz |
Accepts `...' when parsing declarator-ids in C++0x.
Diffstat (limited to 'src/shared/cplusplus/Parser.cpp')
-rw-r--r-- | src/shared/cplusplus/Parser.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 3758c0d852..ec9280f434 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -1218,11 +1218,18 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node) while (parsePtrOperator(*ptr_operators_tail)) ptr_operators_tail = &(*ptr_operators_tail)->next; - if (LA() == T_COLON_COLON || LA() == T_IDENTIFIER || LA() == T_TILDE - || LA() == T_OPERATOR) { + if (LA() == T_COLON_COLON || LA() == T_IDENTIFIER || LA() == T_TILDE || LA() == T_OPERATOR + || (_cxx0xEnabled && LA() == T_DOT_DOT_DOT && (LA(2) == T_COLON_COLON || LA(2) == T_IDENTIFIER))) { + + unsigned dot_dot_dot_token = 0; + + if (LA() == T_DOT_DOT_DOT) + dot_dot_dot_token = consumeToken(); + NameAST *name = 0; if (parseName(name)) { DeclaratorIdAST *declarator_id = new (_pool) DeclaratorIdAST; + declarator_id->dot_dot_dot_token = dot_dot_dot_token; declarator_id->name = name; DeclaratorAST *ast = new (_pool) DeclaratorAST; ast->attribute_list = attributes; |