-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Expand file tree
/
Copy path.clang-format
More file actions
24 lines (24 loc) · 997 Bytes
/
.clang-format
File metadata and controls
24 lines (24 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Defines the Google C++ style for automatic reformatting.
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Google
DerivePointerAlignment: false
MaxEmptyLinesToKeep: 1
SpaceBeforeCaseColon: false
IfMacros:
- IF
- IF_NOT
Macros:
# Make clang-format think TurboShaft `ELSE` expands to just `else`, so that
# it formats well alongside `if`
- ELSE=else
- CASE_=case
- FOR_WITH_HANDLE_SCOPE(isolate, init, loop_var, limit_check, increment)=for(init; loop_var; increment)
- WHILE_WITH_HANDLE_SCOPE(isolate, limit_check)=while(limit_check)
# Make clang-format parse conditions in flag implications as expressions, not type definitions.
- DEFINE_IMPLICATION(cond,flag,value)=if(cond) { flag; };
- DEFINE_WEAK_IMPLICATION(cond,flag,value)=if(cond) { flag; };
- DEFINE_VALUE_IMPLICATION(cond,flag,value)=if(cond) { flag = value; };
- DEFINE_WEAK_VALUE_IMPLICATION(cond,flag,value)=if(cond) { flag = value; };
StatementMacros:
- DECL_CAST
- DECL_VERIFIER