summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangar <florian@nuecke.de>2025-07-05 21:54:07 +0200
committerGitHub <noreply@github.com>2025-07-05 22:54:07 +0300
commitbf869b0e075c65aa0f81d148b42a90dcce2f95c5 (patch)
tree16c584ef639a4d290877a994739c864346a9865f
parent708fff700f36ab3c2ab107b984ec9f3b8be5f055 (diff)
downloadProject-Tick-bf869b0e075c65aa0f81d148b42a90dcce2f95c5.tar.gz
Project-Tick-bf869b0e075c65aa0f81d148b42a90dcce2f95c5.zip
Add IWYU pragmas for provider header (#277)
-rw-r--r--include/toml++/toml.hpp2
-rwxr-xr-xtools/generate_single_header.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/toml++/toml.hpp b/include/toml++/toml.hpp
index 61790c7433..0717cc458e 100644
--- a/include/toml++/toml.hpp
+++ b/include/toml++/toml.hpp
@@ -31,6 +31,7 @@ TOML_PRAGMA_CLANG(diagnostic ignored "-Wreserved-identifier")
#endif
#endif
+// IWYU pragma: begin_exports
#include "impl/std_new.hpp"
#include "impl/std_string.hpp"
#include "impl/std_optional.hpp"
@@ -56,6 +57,7 @@ TOML_PRAGMA_CLANG(diagnostic ignored "-Wreserved-identifier")
#include "impl/toml_formatter.hpp"
#include "impl/json_formatter.hpp"
#include "impl/yaml_formatter.hpp"
+// IWYU pragma: end_exports
#if TOML_IMPLEMENTATION
diff --git a/tools/generate_single_header.py b/tools/generate_single_header.py
index f28748969f..fed4ae4e1e 100755
--- a/tools/generate_single_header.py
+++ b/tools/generate_single_header.py
@@ -122,6 +122,8 @@ def main():
toml_h = re.sub(r'([^@][({,])\n\n', r'\1\n', toml_h)
# blank lines preceeding closing brackets
toml_h = re.sub(r'\n\n([ \t]*[})])', r'\n\1', toml_h)
+ # IWYU pragmas
+ toml_h = re.sub(r'\n// IWYU pragma: [^\n]+\n', '\n', toml_h)
# ensure only one trailing newline
toml_h = toml_h.strip() + '\n'