1 # Copyright (C) 2015-2024 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 # clang-format 7.0.1 is required
18 # To utilize the tool to lines just touched by a patch, use
19 # clang-format-diff script that is usually also packaged with clang-format.
22 # git diff -U0 --no-color | clang-format-diff -p1
23 # (here the tool will generate a patch)
24 # git diff -U0 --no-color | clang-format-diff -p1 -i
25 # (modifications are applied)
29 AccessModifierOffset: -2
30 AlwaysBreakAfterReturnType: TopLevelDefinitions
31 BinPackArguments: true
32 BinPackParameters: true
36 AfterControlStatement: true
40 AfterObjCDeclaration: true
47 SplitEmptyFunction: false
48 BreakBeforeBinaryOperators: All
49 BreakBeforeBraces: Custom
50 BreakBeforeTernaryOperators: true
52 ConstructorInitializerIndentWidth: 2
53 ContinuationIndentWidth: 2
57 'FOR_ALL_EH_REGION_AT',
58 'FOR_ALL_EH_REGION_FN',
59 'FOR_ALL_INHERITED_FIELDS',
63 'FOR_BB_INSNS_REVERSE',
64 'FOR_BB_INSNS_REVERSE_SAFE',
68 'FOR_EACH_2XWIDER_MODE',
69 'FOR_EACH_ACTUAL_CHILD',
70 'FOR_EACH_AGGR_INIT_EXPR_ARG',
73 'FOR_EACH_ALLOCNO_CONFLICT',
74 'FOR_EACH_ALLOCNO_IN_ALLOCNO_SET',
75 'FOR_EACH_ALLOCNO_OBJECT',
76 'FOR_EACH_ARTIFICIAL_DEF',
77 'FOR_EACH_ARTIFICIAL_USE',
80 'FOR_EACH_BB_IN_BITMAP',
81 'FOR_EACH_BB_IN_BITMAP_REV',
82 'FOR_EACH_BB_IN_REGION',
83 'FOR_EACH_BB_IN_SBITMAP',
84 'FOR_EACH_BB_REVERSE',
85 'FOR_EACH_BB_REVERSE_FN',
86 'FOR_EACH_BB_REVERSE_IN_REGION',
87 'FOR_EACH_BIT_IN_MINMAX_SET',
88 'FOR_EACH_BSI_IN_REVERSE',
89 'FOR_EACH_CALL_EXPR_ARG',
92 'FOR_EACH_CODE_MAPPING',
93 'FOR_EACH_COND_FN_PAIR',
95 'FOR_EACH_CONST_CALL_EXPR_ARG',
96 'FOR_EACH_CONSTRUCTOR_ELT',
97 'FOR_EACH_CONSTRUCTOR_VALUE',
100 'FOR_EACH_DEFINED_FUNCTION',
101 'FOR_EACH_DEFINED_SYMBOL',
102 'FOR_EACH_DEFINED_VARIABLE',
107 'FOR_EACH_ELIM_GRAPH_PRED',
108 'FOR_EACH_ELIM_GRAPH_SUCC',
111 'FOR_EACH_EXPR_ID_IN_SET',
112 'FOR_EACH_FLOAT_OPERATOR',
115 'FOREACH_FUNCTION_ARGS',
116 'FOREACH_FUNCTION_ARGS_PTR',
117 'FOR_EACH_FUNCTION_WITH_GIMPLE_BODY',
118 'FOR_EACH_GORI_EXPORT_NAME',
119 'FOR_EACH_GORI_IMPORT_NAME',
120 'FOR_EACH_HASH_TABLE_ELEMENT',
121 'FOR_EACH_HTAB_ELEMENT',
122 'FOR_EACH_IMM_USE_FAST',
123 'FOR_EACH_IMM_USE_ON_STMT',
124 'FOR_EACH_IMM_USE_SAFE',
125 'FOR_EACH_IMM_USE_STMT',
129 'FOR_EACH_INSN_EQ_USE',
130 'FOR_EACH_INSN_INFO_DEF',
131 'FOR_EACH_INSN_INFO_EQ_USE',
132 'FOR_EACH_INSN_INFO_MW',
133 'FOR_EACH_INSN_INFO_USE',
135 'FOR_EACH_INT_OPERATOR',
138 'FOR_EACH_LOAD_BROADCAST',
139 'FOR_EACH_LOAD_BROADCAST_IMM',
140 'FOR_EACH_LOCAL_DECL',
143 'FOR_EACH_LOOP_BREAK',
146 'FOR_EACH_MODE_FROM',
147 'FOR_EACH_MODE_IN_CLASS',
148 'FOR_EACH_MODE_UNTIL',
149 'FOR_EACH_NEST_INFO',
151 'FOR_EACH_OBJECT_CONFLICT',
153 'FOR_EACH_PARTITION_PAIR',
156 'FOR_EACH_PHI_OR_STMT_DEF',
157 'FOR_EACH_PHI_OR_STMT_USE',
161 'FOR_EACH_REFERENCED_VAR',
162 'FOR_EACH_REFERENCED_VAR_IN_BITMAP',
163 'FOR_EACH_REFERENCED_VAR_SAFE',
167 'FOR_EACH_SIGNED_TYPE',
169 'FOR_EACH_SSA_DEF_OPERAND',
170 'FOR_EACH_SSA_MAYDEF_OPERAND',
171 'FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND',
172 'FOR_EACH_SSA_MUSTDEF_OPERAND',
174 'FOR_EACH_SSA_TREE_OPERAND',
175 'FOR_EACH_SSA_USE_OPERAND',
176 'FOR_EACH_SSA_VDEF_OPERAND',
177 'FOR_EACH_STATIC_INITIALIZER',
178 'FOR_EACH_STATIC_VARIABLE',
179 'FOR_EACH_STMT_IN_REVERSE',
182 'FOR_EACH_SUBRTX_PTR',
183 'FOR_EACH_SUBRTX_VAR',
188 'FOR_EACH_UNSIGNED_TYPE',
189 'FOR_EACH_VALUE_ID_IN_SET',
192 'FOR_EACH_VEC_ELT_FROM',
193 'FOR_EACH_VEC_ELT_REVERSE',
194 'FOR_EACH_VEC_SAFE_ELT',
195 'FOR_EACH_VEC_SAFE_ELT_REVERSE',
196 'FOR_EACH_WIDER_MODE',
200 'EXECUTE_IF_SET_IN_BITMAP',
201 'EXECUTE_IF_AND_IN_BITMAP',
202 'EXECUTE_IF_AND_COMPL_IN_BITMAP',
203 'EXECUTE_IF_SET_IN_REG_SET',
204 'EXECUTE_IF_SET_IN_HARD_REG_SET',
205 'EXECUTE_IF_AND_COMPL_IN_REG_SET',
206 'EXECUTE_IF_AND_IN_REG_SET',
207 'EXECUTE_IF_SET_IN_SPARSESET'
209 IndentCaseLabels: false
210 NamespaceIndentation: None
211 PenaltyBreakBeforeFirstCallParameter: 100
212 PointerAlignment: Right
214 SpaceAfterCStyleCast: true
215 SpaceBeforeParens: Always
216 SpacesBeforeTrailingComments: 1
218 AlignEscapedNewlines: Right
219 AlignTrailingComments: true
220 AllowShortFunctionsOnASingleLine: All
221 AlwaysBreakTemplateDeclarations: MultiLine
222 KeepEmptyLinesAtTheStartOfBlocks: false