================ @@ -191,12 +191,28 @@ ASTNodeUP DILParser::ParsePrimaryExpression() { return std::make_unique<IdentifierNode>(loc, identifier); } + uint32_t loc = CurToken().GetLocation(); + std::string nested_name_specifier; + if (CurToken().Is(Token::l_paren)) { - m_dil_lexer.Advance(); - auto expr = ParseExpression(); - Expect(Token::r_paren); - m_dil_lexer.Advance(); - return expr; + nested_name_specifier = ParseNestedNameSpecifier(); + + if (!nested_name_specifier.empty()) { + if (!CurToken().Is(Token::identifier)) { + BailOut("Expected an identifier, but not found.", + CurToken().GetLocation(), CurToken().GetSpelling().length()); + } + + std::string unqualified_id = ParseUnqualifiedId(); + return std::make_unique<IdentifierNode>(loc, nested_name_specifier + + unqualified_id); + } else { ---------------- labath wrote:
no else after return https://github.com/llvm/llvm-project/pull/145055 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits