summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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'