c++: remove lookup_template_class's entering_scope flag
[official-gcc.git] / contrib / clang-format
blobf4f708648eb9b4d4e76cf1e6bb5dc2a4df398786
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.
21 # Example of usage:
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)
27 ---
28 Language: Cpp
29 AccessModifierOffset: -2
30 AlwaysBreakAfterReturnType: TopLevel
31 BinPackArguments: true
32 BinPackParameters: true
33 BraceWrapping:
34   AfterClass: true
35   AfterControlStatement: true
36   AfterEnum: true
37   AfterFunction: true
38   AfterNamespace: false
39   AfterObjCDeclaration: true
40   AfterStruct: true
41   AfterUnion: true
42   BeforeCatch: true
43   BeforeElse: true
44   IndentBraces: true
45   SplitEmptyFunction: false
46 BreakBeforeBinaryOperators: All
47 BreakBeforeBraces: Custom
48 BreakBeforeTernaryOperators: true
49 ColumnLimit: 80
50 ConstructorInitializerIndentWidth: 2
51 ContinuationIndentWidth: 2
52 ForEachMacros: [
53 'FOR_ALL_BB_FN',
54 'FOR_ALL_EH_REGION',
55 'FOR_ALL_EH_REGION_AT',
56 'FOR_ALL_EH_REGION_FN',
57 'FOR_ALL_INHERITED_FIELDS',
58 'FOR_ALL_PREDICATES',
59 'FOR_BB_BETWEEN',
60 'FOR_BB_INSNS',
61 'FOR_BB_INSNS_REVERSE',
62 'FOR_BB_INSNS_REVERSE_SAFE',
63 'FOR_BB_INSNS_SAFE',
64 'FOR_BODY',
65 'FOR_COND',
66 'FOR_EACH_2XWIDER_MODE',
67 'FOR_EACH_ACTUAL_CHILD',
68 'FOR_EACH_AGGR_INIT_EXPR_ARG',
69 'FOR_EACH_ALIAS',
70 'FOR_EACH_ALLOCNO',
71 'FOR_EACH_ALLOCNO_CONFLICT',
72 'FOR_EACH_ALLOCNO_IN_ALLOCNO_SET',
73 'FOR_EACH_ALLOCNO_OBJECT',
74 'FOR_EACH_ARTIFICIAL_DEF',
75 'FOR_EACH_ARTIFICIAL_USE',
76 'FOR_EACH_BB',
77 'FOR_EACH_BB_FN',
78 'FOR_EACH_BB_IN_BITMAP',
79 'FOR_EACH_BB_IN_BITMAP_REV',
80 'FOR_EACH_BB_IN_REGION',
81 'FOR_EACH_BB_IN_SBITMAP',
82 'FOR_EACH_BB_REVERSE',
83 'FOR_EACH_BB_REVERSE_FN',
84 'FOR_EACH_BB_REVERSE_IN_REGION',
85 'FOR_EACH_BIT_IN_MINMAX_SET',
86 'FOR_EACH_BSI_IN_REVERSE',
87 'FOR_EACH_CALL_EXPR_ARG',
88 'FOR_EACH_CHILD',
89 'FOR_EACH_CLONE',
90 'FOR_EACH_CODE_MAPPING',
91 'FOR_EACH_COND_FN_PAIR',
92 'FOR_EACH_CONFLICT',
93 'FOR_EACH_CONST_CALL_EXPR_ARG',
94 'FOR_EACH_CONSTRUCTOR_ELT',
95 'FOR_EACH_CONSTRUCTOR_VALUE',
96 'FOR_EACH_COPY',
97 'FOR_EACH_DEF',
98 'FOR_EACH_DEFINED_FUNCTION',
99 'FOR_EACH_DEFINED_SYMBOL',
100 'FOR_EACH_DEFINED_VARIABLE',
101 'FOR_EACH_DEP',
102 'FOR_EACH_DEP_LINK',
103 'FOR_EACH_EDGE',
104 'FOR_EACH_ELEMENT',
105 'FOR_EACH_ELIM_GRAPH_PRED',
106 'FOR_EACH_ELIM_GRAPH_SUCC',
107 'FOR_EACH_EXPR',
108 'FOR_EACH_EXPR_1',
109 'FOR_EACH_EXPR_ID_IN_SET',
110 'FOR_EACH_FLOAT_OPERATOR',
111 'FOR_EACH_FP_TYPE',
112 'FOR_EACH_FUNCTION',
113 'FOREACH_FUNCTION_ARGS',
114 'FOREACH_FUNCTION_ARGS_PTR',
115 'FOR_EACH_FUNCTION_WITH_GIMPLE_BODY',
116 'FOR_EACH_GORI_EXPORT_NAME',
117 'FOR_EACH_GORI_IMPORT_NAME',
118 'FOR_EACH_HASH_TABLE_ELEMENT',
119 'FOR_EACH_HTAB_ELEMENT',
120 'FOR_EACH_IMM_USE_FAST',
121 'FOR_EACH_IMM_USE_ON_STMT',
122 'FOR_EACH_IMM_USE_SAFE',
123 'FOR_EACH_IMM_USE_STMT',
124 'FOR_EACH_INSN',
125 'FOR_EACH_INSN_1',
126 'FOR_EACH_INSN_DEF',
127 'FOR_EACH_INSN_EQ_USE',
128 'FOR_EACH_INSN_INFO_DEF',
129 'FOR_EACH_INSN_INFO_EQ_USE',
130 'FOR_EACH_INSN_INFO_MW',
131 'FOR_EACH_INSN_INFO_USE',
132 'FOR_EACH_INSN_USE',
133 'FOR_EACH_INT_OPERATOR',
134 'FOR_EACH_INT_TYPE',
135 'FOR_EACH_INV',
136 'FOR_EACH_LOAD_BROADCAST',
137 'FOR_EACH_LOAD_BROADCAST_IMM',
138 'FOR_EACH_LOCAL_DECL',
139 'FOR_EACH_LOG_LINK',
140 'FOR_EACH_LOOP',
141 'FOR_EACH_LOOP_BREAK',
142 'FOR_EACH_LOOP_FN',
143 'FOR_EACH_MODE',
144 'FOR_EACH_MODE_FROM',
145 'FOR_EACH_MODE_IN_CLASS',
146 'FOR_EACH_MODE_UNTIL',
147 'FOR_EACH_NEST_INFO',
148 'FOR_EACH_OBJECT',
149 'FOR_EACH_OBJECT_CONFLICT',
150 'FOR_EACH_OP',
151 'FOR_EACH_PARTITION_PAIR',
152 'FOR_EACH_PHI',
153 'FOR_EACH_PHI_ARG',
154 'FOR_EACH_PHI_OR_STMT_DEF',
155 'FOR_EACH_PHI_OR_STMT_USE',
156 'FOR_EACH_POP',
157 'FOR_EACH_PREF',
158 'FOR_EACH_REF',
159 'FOR_EACH_REFERENCED_VAR',
160 'FOR_EACH_REFERENCED_VAR_IN_BITMAP',
161 'FOR_EACH_REFERENCED_VAR_SAFE',
162 'FOR_EACH_REF_REV',
163 'FOR_EACH_REGNO',
164 'FOR_EACH_SCALAR',
165 'FOR_EACH_SIGNED_TYPE',
166 'FOR_EACH_SSA',
167 'FOR_EACH_SSA_DEF_OPERAND',
168 'FOR_EACH_SSA_MAYDEF_OPERAND',
169 'FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND',
170 'FOR_EACH_SSA_MUSTDEF_OPERAND',
171 'FOR_EACH_SSA_NAME',
172 'FOR_EACH_SSA_TREE_OPERAND',
173 'FOR_EACH_SSA_USE_OPERAND',
174 'FOR_EACH_SSA_VDEF_OPERAND',
175 'FOR_EACH_STATIC_INITIALIZER',
176 'FOR_EACH_STATIC_VARIABLE',
177 'FOR_EACH_STMT_IN_REVERSE',
178 'FOR_EACH_SUBINSN',
179 'FOR_EACH_SUBRTX',
180 'FOR_EACH_SUBRTX_PTR',
181 'FOR_EACH_SUBRTX_VAR',
182 'FOR_EACH_SUCC',
183 'FOR_EACH_SUCC_1',
184 'FOR_EACH_SYMBOL',
185 'FOR_EACH_TYPE',
186 'FOR_EACH_UNSIGNED_TYPE',
187 'FOR_EACH_VALUE_ID_IN_SET',
188 'FOR_EACH_VARIABLE',
189 'FOR_EACH_VEC_ELT',
190 'FOR_EACH_VEC_ELT_FROM',
191 'FOR_EACH_VEC_ELT_REVERSE',
192 'FOR_EACH_VEC_SAFE_ELT',
193 'FOR_EACH_VEC_SAFE_ELT_REVERSE',
194 'FOR_EACH_WIDER_MODE',
195 'FOR_EXPR',
196 'FOR_INIT_STMT',
197 'FOR_SCOPE',
198 'EXECUTE_IF_SET_IN_BITMAP',
199 'EXECUTE_IF_AND_IN_BITMAP',
200 'EXECUTE_IF_AND_COMPL_IN_BITMAP',
201 'EXECUTE_IF_SET_IN_REG_SET',
202 'EXECUTE_IF_SET_IN_HARD_REG_SET',
203 'EXECUTE_IF_AND_COMPL_IN_REG_SET',
204 'EXECUTE_IF_AND_IN_REG_SET',
205 'EXECUTE_IF_SET_IN_SPARSESET'
207 IndentCaseLabels: false
208 NamespaceIndentation: None
209 PenaltyBreakBeforeFirstCallParameter: 100
210 PointerAlignment: Right
211 SortIncludes: false
212 SpaceAfterCStyleCast: true
213 SpaceBeforeParens: Always
214 SpacesBeforeTrailingComments: 1
215 UseTab: Always
216 AlignEscapedNewlines: Right
217 AlignTrailingComments: true
218 AllowShortFunctionsOnASingleLine: All
219 AlwaysBreakTemplateDeclarations: MultiLine
220 KeepEmptyLinesAtTheStartOfBlocks: false
221 Standard: Auto