iwyu: Do not export C++ headers in most cases

`IWYU pragma: export` enforces the transitive inclusion of the headers,
which undermines the purpose of IWYU.

The remained cases seem useful and could be considered separately:
- `<cassert>` in `util/check.h`
- `<filesystem>` in `util/fs.h`
- `<chrono>` in `util/time.h`
This commit is contained in:
Hennadii Stepanov 2026-01-19 17:03:03 +00:00
parent 898e8d3a2d
commit 19a2edde50
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F
2 changed files with 4 additions and 4 deletions

View File

@ -20,8 +20,8 @@
#include <cstdint>
#include <limits>
#include <optional>
#include <string> // IWYU pragma: export
#include <string_view> // IWYU pragma: export
#include <string>
#include <string_view>
#include <system_error>
#include <type_traits>
#include <vector>

View File

@ -12,8 +12,8 @@
#include <cstring>
#include <locale>
#include <sstream>
#include <string> // IWYU pragma: export
#include <string_view> // IWYU pragma: export
#include <string>
#include <string_view>
#include <vector>
namespace util {