From 495d75a394febb2b33bf4fcc46c0ff6b9dfb5f2f Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Thu, 6 Oct 2022 12:19:24 -0700 Subject: [PATCH] Switch to clang-format 14.0.6 (#2253) 14.0.6 is the latest release at https://pypi.org/project/clang-format/#history, hopefully 15.0.0 will be out soon. Looks like ssciwr/clang-format-wheel#49 is noting issues for this particular release process though. --- .pre-commit-config.yaml | 4 ++-- explorer/syntax/parser.ypp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8252adb7dad..963c286b4abd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -71,14 +71,14 @@ repos: types_or: [c++, proto] language: python args: ['-i'] - additional_dependencies: ['clang-format==13.0.1'] + additional_dependencies: ['clang-format==14.0.6'] - id: explorer-format-grammar name: Format the explorer grammar file entry: explorer/syntax/format_grammar.py language: python files: ^explorer/syntax/(lexer.lpp|parser.ypp)$ pass_filenames: false - additional_dependencies: ['clang-format==13.0.1'] + additional_dependencies: ['clang-format==14.0.6'] - repo: local hooks: diff --git a/explorer/syntax/parser.ypp b/explorer/syntax/parser.ypp index c2b675e1cc04..b68b6355cba2 100644 --- a/explorer/syntax/parser.ypp +++ b/explorer/syntax/parser.ypp @@ -697,7 +697,7 @@ where_expression: type_expression WHERE where_clause_list { auto* self = - arena -> New(context.source_loc(), ".Self", $1); + arena->New(context.source_loc(), ".Self", $1); $$ = arena->New(context.source_loc(), self, $3); } ; @@ -1149,8 +1149,7 @@ declaration: | MIXIN identifier type_params mixin_import LEFT_CURLY_BRACE mixin_body RIGHT_CURLY_BRACE { // EXPERIMENTAL MIXN FEATURE - auto self = - arena -> New(context.source_loc(), "Self", $4); + auto self = arena->New(context.source_loc(), "Self", $4); $$ = arena->New(context.source_loc(), $2, $3, self, $6); } | CHOICE identifier type_params LEFT_CURLY_BRACE alternative_list RIGHT_CURLY_BRACE