summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/ASTMatcher.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-03-24 14:56:30 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2010-03-24 14:56:45 +0100
commitcf125618afe323da0b1d63eb01ff70fbbaaef3d0 (patch)
treebad9dc8c275d1efe5dc347cadda61a35ef99f35d /src/shared/cplusplus/ASTMatcher.cpp
parentfe1c4926dec9ac729979212b4419989d56a1af48 (diff)
downloadqt-creator-cf125618afe323da0b1d63eb01ff70fbbaaef3d0.tar.gz
Accepts trailing return types.
Diffstat (limited to 'src/shared/cplusplus/ASTMatcher.cpp')
-rw-r--r--src/shared/cplusplus/ASTMatcher.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/cplusplus/ASTMatcher.cpp b/src/shared/cplusplus/ASTMatcher.cpp
index 75ec26467d..d08bfffc0e 100644
--- a/src/shared/cplusplus/ASTMatcher.cpp
+++ b/src/shared/cplusplus/ASTMatcher.cpp
@@ -780,6 +780,11 @@ bool ASTMatcher::match(FunctionDeclaratorAST *node, FunctionDeclaratorAST *patte
else if (! AST::match(node->exception_specification, pattern->exception_specification, this))
return false;
+ if (! pattern->trailing_return_type)
+ pattern->trailing_return_type = node->trailing_return_type;
+ else if (! AST::match(node->trailing_return_type, pattern->trailing_return_type, this))
+ return false;
+
if (! pattern->as_cpp_initializer)
pattern->as_cpp_initializer = node->as_cpp_initializer;
else if (! AST::match(node->as_cpp_initializer, pattern->as_cpp_initializer, this))