diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2012-09-17 09:58:09 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-09-19 11:47:49 +0200 |
commit | b9f6f1bcf72510fedf1b041b359062e8e80f2880 (patch) | |
tree | 64c633468ef4b43133c93aae4e75ba4a4ce25054 /src/libs/3rdparty/cplusplus/ASTMatcher.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 <qthjk@ovi.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatcher.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/ASTMatcher.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp index 5a32992d5e..7a55d0a579 100644 --- a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp +++ b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp @@ -1319,15 +1319,11 @@ bool ASTMatcher::match(MemInitializerAST *node, MemInitializerAST *pattern) else if (! AST::match(node->name, pattern->name, this)) return false; - pattern->lparen_token = node->lparen_token; - - if (! pattern->expression_list) - pattern->expression_list = node->expression_list; - else if (! AST::match(node->expression_list, pattern->expression_list, this)) + if (! pattern->expression) + pattern->expression = node->expression; + else if (! AST::match(node->expression, pattern->expression, this)) return false; - pattern->rparen_token = node->rparen_token; - return true; } |