-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Labels
clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing featuregood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
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.
#include "pack_begin.h"
typedef struct {
} a_packed_struct;
#include "pack_end.h"
typedef struct {
} an_unpacked_struct;
#include "pack_begin.h" // readability-duplicate-include warns here
typedef struct {
} another_packed_struct;
#include "pack_end.h" // readability-duplicate-include warns hereIt would be nice if this checker provided a configuration option taking a list of strings or regexes defining headers that are OK to duplicate.
Metadata
Metadata
Assignees
Labels
clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing featuregood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute