Clean up includes

This cleans up includes that clangd reports as unused, usually by deleting the offending include. The process was to delete an include and see if it still builds. If not, try to find a more specific include(s) that works, that was previously transitively included. If the original include seems intended to re-export said transitive include, mark the transitive include as `// IWYU pragma: export`. Otherwise, replace the original include with the transitive include(s). If none of the above applies, because the original file depends on code directly in the include somehow, or the direct include is an external dependency that cannot be modified, restore the original include and mark it as `// IWYU pragma: keep`.

Change-Id: I5ce3d34dad76b0cad0a6a7990fea13add393aad3
This commit is contained in:
skyrelia
2025-04-08 12:13:42 +00:00
committed by Skye
parent 2ef4b69760
commit ba1c9d52ec
49 changed files with 26 additions and 99 deletions
+11
View File
@@ -1,3 +1,14 @@
#include "eval-settings.hh"
#include "lix/libexpr/nixexpr.hh"
#include "lix/libexpr/parser/change_head.hh"
#include "lix/libexpr/parser/grammar.hh"
#include "lix/libexpr/parser/state.hh"
#include "lix/libexpr/pos-idx.hh"
#include "lix/libutil/finally.hh"
#include "lix/libutil/users.hh"
#include <charconv>
// flip this define when doing parser development to enable some g checks.
#if 0
#include <tao/pegtl/contrib/analyze.hpp>