diff --git a/CMakePresets.json b/CMakePresets.json index f7a2eaee..6fe5bd67 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,5 +1,5 @@ { - "version": 9, + "version": 7, "configurePresets": [ { "name": "default", diff --git a/src/parser/cxx/parser.cc b/src/parser/cxx/parser.cc index c0b9f2dc..cbc372f7 100644 --- a/src/parser/cxx/parser.cc +++ b/src/parser/cxx/parser.cc @@ -1302,7 +1302,9 @@ auto Parser::parse_primary_expression(ExpressionAST*& yyast, const ExprContext& ctx) -> bool { UnqualifiedIdAST* name = nullptr; - if (parse_this_expression(yyast)) { + if (parse_builtin_call_expression(yyast, ctx)) { + return true; + } else if (parse_this_expression(yyast)) { return true; } else if (parse_literal(yyast)) { return true; @@ -2408,9 +2410,7 @@ auto Parser::parse_postfix_expression(ExpressionAST*& yyast, auto Parser::parse_start_of_postfix_expression(ExpressionAST*& yyast, const ExprContext& ctx) -> bool { - if (parse_builtin_call_expression(yyast, ctx)) - return true; - else if (parse_va_arg_expression(yyast, ctx)) + if (parse_va_arg_expression(yyast, ctx)) return true; else if (parse_cpp_cast_expression(yyast, ctx)) return true; diff --git a/tests/manual/source.cc b/tests/manual/source.cc index 2f633536..0c83fef6 100644 --- a/tests/manual/source.cc +++ b/tests/manual/source.cc @@ -59,7 +59,11 @@ #include #include #include + +#ifdef __cpp_lib_mdspan #include +#endif + #include #include