| Issue |
166938
|
| Summary |
Add header ignore option to readability-duplicate-include
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
nick-potenski
|
Our codebase has a few cases where duplicate includes are expected. For example, we have a pair of headers to manage enabling and disabling structure packing which are typically included around a structure that we want packed on a byte boundary.
```c
#include "pack_begin.h"
typedef struct {
} a_packed_struct;
#include "pack_end.h"
typedef struct {
} an_unpacked_struct;
#include "pack_begin.h"
typedef struct {
} another_packed_struct;
#include "pack_end.h"
```
It would be nice if this checker provided a configuration option taking a list of strings or regexes defining headers that are OK to duplicate.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs