Commit 467ad6a
authored
[clang-format] Add support for absl nullability macros (llvm#130346)
Add support for formatting w/ absl nullability macros
(https://github.com/abseil/abseil-cpp/blob/c52afac4f87ef76e6293b84874e5126a62be1f15/absl/base/nullability.h#L237).
Example at https://godbolt.org/z/PYv19M1Gj
input:
```
std::vector<int* _Nonnull> x;
std::vector<int* absl_nonnull> y;
```
orig output:
```
std::vector<int* _Nonnull> x;
std::vector<int * absl_nonnull> y;
```
new output:
```
std::vector<int* _Nonnull> x;
std::vector<int* absl_nonnull> y;
```
credit to @ymand for the original patch1 parent 6b7daf2 commit 467ad6a
File tree
4 files changed
+51
-2
lines changed- clang
- lib/Format
- unittests/Format
4 files changed
+51
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1713 | 1713 | | |
1714 | 1714 | | |
1715 | 1715 | | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
1716 | 1720 | | |
1717 | 1721 | | |
1718 | 1722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12375 | 12375 | | |
12376 | 12376 | | |
12377 | 12377 | | |
| 12378 | + | |
| 12379 | + | |
| 12380 | + | |
12378 | 12381 | | |
12379 | 12382 | | |
12380 | 12383 | | |
| |||
12518 | 12521 | | |
12519 | 12522 | | |
12520 | 12523 | | |
| 12524 | + | |
| 12525 | + | |
| 12526 | + | |
| 12527 | + | |
| 12528 | + | |
| 12529 | + | |
12521 | 12530 | | |
12522 | 12531 | | |
12523 | 12532 | | |
| |||
12676 | 12685 | | |
12677 | 12686 | | |
12678 | 12687 | | |
| 12688 | + | |
| 12689 | + | |
| 12690 | + | |
| 12691 | + | |
| 12692 | + | |
| 12693 | + | |
12679 | 12694 | | |
12680 | 12695 | | |
12681 | 12696 | | |
| |||
12687 | 12702 | | |
12688 | 12703 | | |
12689 | 12704 | | |
12690 | | - | |
| 12705 | + | |
| 12706 | + | |
| 12707 | + | |
12691 | 12708 | | |
12692 | 12709 | | |
12693 | 12710 | | |
| |||
12701 | 12718 | | |
12702 | 12719 | | |
12703 | 12720 | | |
12704 | | - | |
| 12721 | + | |
12705 | 12722 | | |
12706 | 12723 | | |
12707 | 12724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3185 | 3185 | | |
3186 | 3186 | | |
3187 | 3187 | | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
3188 | 3211 | | |
3189 | 3212 | | |
3190 | 3213 | | |
| |||
0 commit comments