Commit 20c323a
authored
[clang-tidy] Do not lint on attribute macros (#164806)
`cppcoreguidelines-macro-usage` lint incorrectly identifies these macros
as candidates for rewrite into template arguments. There are no,
variadic or not, equivalent to these macros using templated functions.
In short, we should not suggest code writers to rewrite this macro with
`constexpr` functions.
```c
#define FORMAT_STR(format_msg, first_idx) __attribute__((format(printf, format_msg, first_idx)))
```
Signed-off-by: Xiangfei Ding <[email protected]>1 parent d1c086e commit 20c323a
File tree
3 files changed
+19
-2
lines changed- clang-tools-extra
- clang-tidy/cppcoreguidelines
- docs
- test/clang-tidy/checkers/cppcoreguidelines
3 files changed
+19
-2
lines changedLines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
92 | | - | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | | - | |
| 104 | + | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
0 commit comments