diff options
| author | Christian Kamm <[email protected]> | 2012-09-17 09:58:09 +0200 |
|---|---|---|
| committer | hjk <[email protected]> | 2012-09-19 11:47:49 +0200 |
| commit | b9f6f1bcf72510fedf1b041b359062e8e80f2880 (patch) | |
| tree | 64c633468ef4b43133c93aae4e75ba4a4ce25054 /src/libs/cplusplus/FindUsages.cpp | |
| parent | 903ba378c2a159bc8e7f2cf43a480484d6a3a217 (diff) | |
C++11: Allow uniform initialization in ctor init lists.
So
class C { C() : _x{12}, _y({12}) {} };
now parses correctly.
Change-Id: I4281dcb0541a86b550e74630cad6ae0a59fef1b4
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/FindUsages.cpp')
| -rw-r--r-- | src/libs/cplusplus/FindUsages.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libs/cplusplus/FindUsages.cpp b/src/libs/cplusplus/FindUsages.cpp index 0ccbd3953de..09e65e9436b 100644 --- a/src/libs/cplusplus/FindUsages.cpp +++ b/src/libs/cplusplus/FindUsages.cpp @@ -536,11 +536,7 @@ void FindUsages::memInitializer(MemInitializerAST *ast) (void) switchScope(previousScope); } } - // unsigned lparen_token = ast->lparen_token; - for (ExpressionListAST *it = ast->expression_list; it; it = it->next) { - this->expression(it->value); - } - // unsigned rparen_token = ast->rparen_token; + this->expression(ast->expression); } bool FindUsages::visit(NestedNameSpecifierAST *ast) @@ -561,8 +557,11 @@ void FindUsages::nestedNameSpecifier(NestedNameSpecifierAST *ast) bool FindUsages::visit(ExpressionListParenAST *ast) { - (void) ast; - Q_ASSERT(!"unreachable"); + // unsigned lparen_token = ast->lparen_token; + for (ExpressionListAST *it = ast->expression_list; it; it = it->next) { + this->expression(it->value); + } + // unsigned rparen_token = ast->rparen_token; return false; } |
