Skip to content

Commit 8a068e9

Browse files
dkolsen-pgilanza
authored andcommitted
[CIR] ClangIR specific .clang-tidy files (#1402)
Commit the .clang-tidy files for ClangIR. The biggest different between these and the Clang files is the capitalization of variable names. Most ClangIR code follows the MLIR conventions instead of the Clang conventions.
1 parent 0a0500c commit 8a068e9

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

clang/lib/CIR/.clang-tidy

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
InheritParentConfig: true
2+
Checks: >
3+
-misc-const-correctness,
4+
-llvm-header-guard,
5+
bugprone-argument-comment,
6+
bugprone-assert-side-effect,
7+
bugprone-branch-clone,
8+
bugprone-copy-constructor-init,
9+
bugprone-dangling-handle,
10+
bugprone-dynamic-static-initializers,
11+
bugprone-macro-parentheses,
12+
bugprone-macro-repeated-side-effects,
13+
bugprone-misplaced-widening-cast,
14+
bugprone-move-forwarding-reference,
15+
bugprone-multiple-statement-macro,
16+
bugprone-suspicious-semicolon,
17+
bugprone-swapped-arguments,
18+
bugprone-terminating-continue,
19+
bugprone-unused-raii,
20+
bugprone-unused-return-value,
21+
misc-redundant-expression,
22+
misc-static-assert,
23+
misc-unused-using-decls,
24+
modernize-use-bool-literals,
25+
modernize-loop-convert,
26+
modernize-make-unique,
27+
modernize-raw-string-literal,
28+
modernize-use-equals-default,
29+
modernize-use-default-member-init,
30+
modernize-use-emplace,
31+
modernize-use-nullptr,
32+
modernize-use-override,
33+
modernize-use-using,
34+
performance-for-range-copy,
35+
performance-implicit-conversion-in-loop,
36+
performance-inefficient-algorithm,
37+
performance-inefficient-vector-operation,
38+
performance-move-const-arg,
39+
performance-no-automatic-move,
40+
performance-trivially-destructible,
41+
performance-unnecessary-copy-initialization,
42+
performance-unnecessary-value-param,
43+
readability-avoid-const-params-in-decls,
44+
readability-const-return-type,
45+
readability-container-size-empty,
46+
readability-identifier-naming,
47+
readability-inconsistent-declaration-parameter-name,
48+
readability-misleading-indentation,
49+
readability-redundant-control-flow,
50+
readability-redundant-smartptr-get,
51+
readability-simplify-boolean-expr,
52+
readability-simplify-subscript-expr,
53+
readability-use-anyofallof
54+
55+
56+
CheckOptions:
57+
- key: readability-identifier-naming.MemberCase
58+
value: camelBack
59+
- key: readability-identifier-naming.ParameterCase
60+
value: camelBack
61+
- key: readability-identifier-naming.VariableCase
62+
value: camelBack
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
InheritParentConfig: true
2+
CheckOptions:
3+
- key: readability-identifier-naming.ClassCase
4+
value: CamelCase
5+
- key: readability-identifier-naming.EnumCase
6+
value: CamelCase
7+
- key: readability-identifier-naming.FunctionCase
8+
value: camelBack
9+
- key: readability-identifier-naming.MemberCase
10+
value: CamelCase
11+
- key: readability-identifier-naming.ParameterCase
12+
value: CamelCase
13+
- key: readability-identifier-naming.UnionCase
14+
value: CamelCase
15+
- key: readability-identifier-naming.VariableCase
16+
value: CamelCase

0 commit comments

Comments
 (0)