diff --git a/src/libs/3rdparty/cplusplus/AST.cpp b/src/libs/3rdparty/cplusplus/AST.cpp index 5c59bb683ca..cfff38692ed 100644 --- a/src/libs/3rdparty/cplusplus/AST.cpp +++ b/src/libs/3rdparty/cplusplus/AST.cpp @@ -4667,8 +4667,6 @@ int NoExceptOperatorExpressionAST::lastToken() const int TypeConstraintAST::firstToken() const { - if (nestedName) - return nestedName->firstToken(); return conceptName->firstToken(); } diff --git a/src/libs/3rdparty/cplusplus/AST.h b/src/libs/3rdparty/cplusplus/AST.h index 70ee37b9f9d..b42caca73b3 100644 --- a/src/libs/3rdparty/cplusplus/AST.h +++ b/src/libs/3rdparty/cplusplus/AST.h @@ -646,8 +646,7 @@ protected: class CPLUSPLUS_EXPORT TypeConstraintAST: public AST { public: - NestedNameSpecifierListAST *nestedName = nullptr; - NameAST *conceptName = nullptr; + QualifiedNameAST *conceptName = nullptr; int lessToken = 0; ExpressionListAST *templateArgs = nullptr; int greaterToken = 0; diff --git a/src/libs/3rdparty/cplusplus/ASTClone.cpp b/src/libs/3rdparty/cplusplus/ASTClone.cpp index 688a7708534..55aa6fdbf25 100644 --- a/src/libs/3rdparty/cplusplus/ASTClone.cpp +++ b/src/libs/3rdparty/cplusplus/ASTClone.cpp @@ -144,9 +144,6 @@ DecltypeSpecifierAST *DecltypeSpecifierAST::clone(MemoryPool *pool) const TypeConstraintAST *TypeConstraintAST::clone(MemoryPool *pool) const { const auto ast = new (pool) TypeConstraintAST; - for (NestedNameSpecifierListAST *iter = nestedName, **ast_iter = &ast->nestedName; iter; - iter = iter->next, ast_iter = &(*ast_iter)->next) - *ast_iter = new (pool) NestedNameSpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr); if (conceptName) ast->conceptName = conceptName->clone(pool); ast->lessToken = lessToken; diff --git a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp index e417ecc3072..747abaa2ae4 100644 --- a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp +++ b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp @@ -218,10 +218,6 @@ bool ASTMatcher::match(DecltypeSpecifierAST *node, DecltypeSpecifierAST *pattern bool ASTMatcher::match(TypeConstraintAST *node, TypeConstraintAST *pattern) { - if (!pattern->nestedName) - pattern->nestedName = node->nestedName; - else if (!AST::match(node->nestedName, pattern->nestedName, this)) - return false; if (!pattern->conceptName) pattern->conceptName = node->conceptName; else if (!AST::match(node->conceptName, pattern->conceptName, this)) diff --git a/src/libs/3rdparty/cplusplus/ASTVisit.cpp b/src/libs/3rdparty/cplusplus/ASTVisit.cpp index 937a9a0ab15..af47e6d4792 100644 --- a/src/libs/3rdparty/cplusplus/ASTVisit.cpp +++ b/src/libs/3rdparty/cplusplus/ASTVisit.cpp @@ -113,7 +113,6 @@ void DecltypeSpecifierAST::accept0(ASTVisitor *visitor) void TypeConstraintAST::accept0(ASTVisitor *visitor) { if (visitor->visit(this)) { - accept(nestedName, visitor); accept(conceptName, visitor); accept(templateArgs, visitor); } diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp index 21465014748..40d0997692a 100644 --- a/src/libs/3rdparty/cplusplus/Parser.cpp +++ b/src/libs/3rdparty/cplusplus/Parser.cpp @@ -1338,8 +1338,9 @@ bool Parser::parseTypeConstraint(TypeConstraintAST *&node) if (!parseUnqualifiedName(conceptName, false)) return false; const auto typeConstraint = new (_pool) TypeConstraintAST; - typeConstraint->nestedName = nestedName; - typeConstraint->conceptName = conceptName; + typeConstraint->conceptName = new (_pool) QualifiedNameAST; + typeConstraint->conceptName->nested_name_specifier_list = nestedName; + typeConstraint->conceptName->unqualified_name = conceptName; if (LA() != T_LESS) { node = typeConstraint; return true;