diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-11-07 15:51:08 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-11-14 14:23:05 +0100 |
commit | 0d80574a5bd6cfe21827a7e0da2ddc84773363a3 (patch) | |
tree | 348199b3d1f4e71343207e593285a862eee40224 /src/utils/cpp | |
parent | 5ffc62e1df6a85cc4e2874e80fe73919ef75b0df (diff) | |
download | justbuild-0d80574a5bd6cfe21827a7e0da2ddc84773363a3.tar.gz |
build_engine: Implement IWYU suggestions
Requires the use of a pragma to avoid wrong removal suggestion for
path_hash.hpp.
Co-authored-by: Maksim Denisov <denisov.maksim@huawei.com>
Diffstat (limited to 'src/utils/cpp')
-rw-r--r-- | src/utils/cpp/path_hash.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/cpp/path_hash.hpp b/src/utils/cpp/path_hash.hpp index 2f433c30..15587be9 100644 --- a/src/utils/cpp/path_hash.hpp +++ b/src/utils/cpp/path_hash.hpp @@ -15,14 +15,17 @@ #ifndef INCLUDED_SRC_UTILS_CPP_PATH_HASH_HPP #define INCLUDED_SRC_UTILS_CPP_PATH_HASH_HPP -#include <cstddef> -#include <filesystem> +// IWYU pragma: always_keep // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define GLIBCXX_11_4 20230528 // gcc/DATESTAMP of version 11.4 #if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12 and \ !(_GLIBCXX_RELEASE == 11 and __GLIBCXX__ >= GLIBCXX_11_4)) or \ (defined(_LIBCPP_VERSION) and _LIBCPP_VERSION < 16000) + +#include <cstddef> +#include <filesystem> + // std::hash<std::filesystem::path> is missing for // - GNU's libstdc++ < 11.4 // - LLVM's libcxx < 16 (see https://reviews.llvm.org/D125394) |