浏览代码

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.
Jon Ross-Perkins 3 年之前
父节点
当前提交
495d75a394
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 2 2
      .pre-commit-config.yaml
  2. 2 3
      explorer/syntax/parser.ypp

+ 2 - 2
.pre-commit-config.yaml

@@ -71,14 +71,14 @@ repos:
         types_or: [c++, proto]
         types_or: [c++, proto]
         language: python
         language: python
         args: ['-i']
         args: ['-i']
-        additional_dependencies: ['clang-format==13.0.1']
+        additional_dependencies: ['clang-format==14.0.6']
       - id: explorer-format-grammar
       - id: explorer-format-grammar
         name: Format the explorer grammar file
         name: Format the explorer grammar file
         entry: explorer/syntax/format_grammar.py
         entry: explorer/syntax/format_grammar.py
         language: python
         language: python
         files: ^explorer/syntax/(lexer.lpp|parser.ypp)$
         files: ^explorer/syntax/(lexer.lpp|parser.ypp)$
         pass_filenames: false
         pass_filenames: false
-        additional_dependencies: ['clang-format==13.0.1']
+        additional_dependencies: ['clang-format==14.0.6']
 
 
   - repo: local
   - repo: local
     hooks:
     hooks:

+ 2 - 3
explorer/syntax/parser.ypp

@@ -697,7 +697,7 @@ where_expression:
   type_expression WHERE where_clause_list
   type_expression WHERE where_clause_list
     {
     {
       auto* self =
       auto* self =
-          arena -> New<GenericBinding>(context.source_loc(), ".Self", $1);
+          arena->New<GenericBinding>(context.source_loc(), ".Self", $1);
       $$ = arena->New<WhereExpression>(context.source_loc(), self, $3);
       $$ = arena->New<WhereExpression>(context.source_loc(), self, $3);
     }
     }
 ;
 ;
@@ -1149,8 +1149,7 @@ declaration:
 | MIXIN identifier type_params mixin_import LEFT_CURLY_BRACE mixin_body RIGHT_CURLY_BRACE
 | MIXIN identifier type_params mixin_import LEFT_CURLY_BRACE mixin_body RIGHT_CURLY_BRACE
     {
     {
       // EXPERIMENTAL MIXN FEATURE
       // EXPERIMENTAL MIXN FEATURE
-      auto self =
-          arena -> New<GenericBinding>(context.source_loc(), "Self", $4);
+      auto self = arena->New<GenericBinding>(context.source_loc(), "Self", $4);
       $$ = arena->New<MixinDeclaration>(context.source_loc(), $2, $3, self, $6);
       $$ = arena->New<MixinDeclaration>(context.source_loc(), $2, $3, self, $6);
     }
     }
 | CHOICE identifier type_params LEFT_CURLY_BRACE alternative_list RIGHT_CURLY_BRACE
 | CHOICE identifier type_params LEFT_CURLY_BRACE alternative_list RIGHT_CURLY_BRACE