-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
64 lines (55 loc) · 2.24 KB
/
Copy path.clang-format
File metadata and controls
64 lines (55 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# SPDX-FileCopyrightText: Contributors to the HPCToolkit Project
#
# SPDX-License-Identifier: CC0-1.0
# This configuration file targets clang-format 18.x. Do not add configuration for newer
# versions of clang-format, nor for deprecated options or formats.
#
# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for explainations of all
# available options.
# Except where overridden, we follow the LLVM code style.
BasedOnStyle: LLVM
# Forably sort #includes alphabetically, grouping them based roughly on their purpose:
#
# 1. Local headers (e.g. `#include "loadmap.h"`)
# 2. Dependency and C system headers (e.g. `#include <xed/xed-interface.h>`)
# 3. C++ system headers (e.g. `#include <vector>`)
#
# This order ensures local headers properly #include their dependencies, and permits
# dropping system #includes (if allowed by other policy like e.g. IWYU).
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '(^[<"]|/)vgannotations\.hpp[">]' # This header MUST come first, before any others
Priority: -100
SortPriority: 0
CaseSensitive: true
- Regex: '^<.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
# Increase the line limit to "90-ish," a stance taken by the [Black formatting style for
# Python][1]. The line soft limit is 88 (10% more than the popular but tight 80), but
# the actual line length can be longer if wrapping would introduce a break. For example,
# the following comment is left untouched even though it is 90 columns wide, but any
# longer would trigger a break:
#
# ```c
# // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
# ```
#
# [1]: https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
ColumnLimit: 88
PenaltyExcessCharacter: 100
# Align the pointer `*` and reference `&` with the type, not the variable. This is the
# preferred alignment for types since it better visually separates the type from the
# variable name, e.g. `char*** x`.
DerivePointerAlignment: false
PointerAlignment: Left
ReferenceAlignment: Pointer