diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-03-03 15:00:21 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2023-03-06 13:20:04 +0000 |
commit | 755d9769d81a5dc4e0b837650f9fab27a3f094ab (patch) | |
tree | c0ff4b3b9b3e16991f7903ceaddb2f6aa4aad9e1 /src/libs/3rdparty/cplusplus/ASTMatch0.cpp | |
parent | dc8da57e6452ce4dbd97b1a53de8c297bd4e5bcf (diff) |
CPlusPlus: Add support for coroutines
Also fix some concept-related bugs uncovered by the test case.
Change-Id: Ia67c971026bcd85d9cc252f46cd4f56c2865d432
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatch0.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/ASTMatch0.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp index a4bd9935f0..b58bd59efe 100644 --- a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp +++ b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp @@ -941,6 +941,20 @@ bool ThrowExpressionAST::match0(AST *pattern, ASTMatcher *matcher) return false; } +bool YieldExpressionAST::match0(AST *pattern, ASTMatcher *matcher) +{ + if (const auto other = pattern->asYieldExpression()) + return matcher->match(this, other); + return false; +} + +bool AwaitExpressionAST::match0(AST *pattern, ASTMatcher *matcher) +{ + if (const auto other = pattern->asAwaitExpression()) + return matcher->match(this, other); + return false; +} + bool NoExceptOperatorExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { if (NoExceptOperatorExpressionAST *_other = pattern->asNoExceptOperatorExpression()) |