aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/ASTMatch0.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-02-09 15:11:14 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2023-02-28 08:32:40 +0000
commit61de69ea907bfd5e7d0b6eb97975194352c9c5f3 (patch)
treec3a974c9685153c63f65348e34117a0408f2d30b /src/libs/3rdparty/cplusplus/ASTMatch0.cpp
parent89a8631784dfee4a96bc32f92d49e9747f426f1f (diff)
CPlusPlus: Handle C++20 concepts in parser
Change-Id: I8c6b8b1ba3f36b83cd1d667bec9830271147b1ac 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.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp
index 4105ec3c52..afe94aba06 100644
--- a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp
+++ b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp
@@ -112,6 +112,21 @@ bool DecltypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
return false;
}
+bool TypeConstraintAST::match0(AST *pattern, ASTMatcher *matcher)
+{
+ if (const auto _other = pattern->asTypeConstraint())
+ return matcher->match(this, _other);
+
+ return false;
+}
+
+bool PlaceholderTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
+{
+ if (const auto _other = pattern->asPlaceholderTypeSpecifier())
+ return matcher->match(this, _other);
+ return false;
+}
+
bool DeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclaratorAST *_other = pattern->asDeclarator())
@@ -896,6 +911,21 @@ bool TemplateDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
return false;
}
+bool ConceptDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
+{
+ if (ConceptDeclarationAST *_other = pattern->asConceptDeclaration())
+ return matcher->match(this, _other);
+
+ return false;
+}
+
+bool RequiresExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
+{
+ if (const auto other = pattern->asRequiresExpression())
+ return matcher->match(this, other);
+ return false;
+}
+
bool ThrowExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ThrowExpressionAST *_other = pattern->asThrowExpression())