iwyu: Do not export C++ headers in most cases
What changed, and why it matters
This is a code-cleanup change that removes 'export' markers from two C++ header files. It tells the compiler's include-what-you-use tool not to force other files to automatically pull in <string> and <string_view> just because they include these utility headers. There is no security impact.
No security action needed. Treat as normal build-hygiene maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes IWYU pragma: export annotations from
Changed components
src/util/strencodings.hsrc/util/string.hInspect captured patch +4 / −4
diff --git a/src/util/strencodings.h b/src/util/strencodings.h
index 01063858..fe0e2554 100644
--- a/src/util/strencodings.h
+++ b/src/util/strencodings.h
@@ -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>
diff --git a/src/util/string.h b/src/util/string.h
index 330c2a2a..2578e530 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -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 {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.