summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-11-05 11:52:07 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2024-11-14 14:23:05 +0100
commitaa89a9959b041538d8039f02aa34b65c7355b461 (patch)
tree8457f2b3e1514cc41c626f461c7af4a4587147f9
parent2977e1b86bcbcda31041414736e5545c23e15a01 (diff)
downloadjustbuild-aa89a9959b041538d8039f02aa34b65c7355b461.tar.gz
tpp includes: Add hint for IWYU linting
IWYU needs to be explicitly instructed how to handle included .tpp files in order to not falsely suggest their removal. Conversely, it also needs to know not to suggest including .tpp files instead of the corresponding .hpp files.
-rw-r--r--src/buildtool/storage/large_object_cas.hpp2
-rw-r--r--src/buildtool/storage/large_object_cas.tpp2
-rw-r--r--src/buildtool/storage/local_ac.hpp2
-rw-r--r--src/buildtool/storage/local_ac.tpp2
-rw-r--r--src/buildtool/storage/local_cas.hpp2
-rw-r--r--src/buildtool/storage/local_cas.tpp2
-rw-r--r--src/buildtool/storage/target_cache.hpp2
-rw-r--r--src/buildtool/storage/target_cache.tpp2
8 files changed, 12 insertions, 4 deletions
diff --git a/src/buildtool/storage/large_object_cas.hpp b/src/buildtool/storage/large_object_cas.hpp
index 086875df..21b3127d 100644
--- a/src/buildtool/storage/large_object_cas.hpp
+++ b/src/buildtool/storage/large_object_cas.hpp
@@ -199,6 +199,6 @@ class LargeObjectCAS final {
};
// NOLINTNEXTLINE(misc-header-include-cycle)
-#include "src/buildtool/storage/large_object_cas.tpp"
+#include "src/buildtool/storage/large_object_cas.tpp" // IWYU pragma: export
#endif // INCLUDED_SRC_BUILDTOOL_STORAGE_LARGE_OBJECT_CAS_HPP
diff --git a/src/buildtool/storage/large_object_cas.tpp b/src/buildtool/storage/large_object_cas.tpp
index bb7794bb..5b8daa32 100644
--- a/src/buildtool/storage/large_object_cas.tpp
+++ b/src/buildtool/storage/large_object_cas.tpp
@@ -15,6 +15,8 @@
#ifndef INCLUDED_SRC_BUILDTOOL_STORAGE_LARGE_OBJECT_CAS_TPP
#define INCLUDED_SRC_BUILDTOOL_STORAGE_LARGE_OBJECT_CAS_TPP
+// IWYU pragma: private, include "src/buildtool/storage/large_object_cas.hpp"
+
#include <cstddef>
#include <cstdlib>
#include <fstream>
diff --git a/src/buildtool/storage/local_ac.hpp b/src/buildtool/storage/local_ac.hpp
index 7edb5bf3..60354a2b 100644
--- a/src/buildtool/storage/local_ac.hpp
+++ b/src/buildtool/storage/local_ac.hpp
@@ -133,7 +133,7 @@ class LocalAC {
#ifndef BOOTSTRAP_BUILD_TOOL
// NOLINTNEXTLINE(misc-header-include-cycle)
-#include "src/buildtool/storage/local_ac.tpp"
+#include "src/buildtool/storage/local_ac.tpp" // IWYU pragma: export
#endif
#endif // INCLUDED_SRC_BUILDTOOL_STORAGE_LOCAL_AC_HPP
diff --git a/src/buildtool/storage/local_ac.tpp b/src/buildtool/storage/local_ac.tpp
index d5cbbe5e..05939746 100644
--- a/src/buildtool/storage/local_ac.tpp
+++ b/src/buildtool/storage/local_ac.tpp
@@ -15,6 +15,8 @@
#ifndef INCLUDED_SRC_BUILDTOOL_STORAGE_LOCAL_AC_TPP
#define INCLUDED_SRC_BUILDTOOL_STORAGE_LOCAL_AC_TPP
+// IWYU pragma: private, include "src/buildtool/storage/local_ac.hpp"
+
#include <tuple> //std::ignore
#include <utility> // std::move
diff --git a/src/buildtool/storage/local_cas.hpp b/src/buildtool/storage/local_cas.hpp
index 5f3a9db6..9a9f040a 100644
--- a/src/buildtool/storage/local_cas.hpp
+++ b/src/buildtool/storage/local_cas.hpp
@@ -353,7 +353,7 @@ class LocalCAS {
#ifndef BOOTSTRAP_BUILD_TOOL
// NOLINTNEXTLINE(misc-header-include-cycle)
-#include "src/buildtool/storage/local_cas.tpp"
+#include "src/buildtool/storage/local_cas.tpp" // IWYU pragma: export
#else
template <bool kDoGlobalUplink>
auto LocalCAS<kDoGlobalUplink>::CheckTreeInvariant(
diff --git a/src/buildtool/storage/local_cas.tpp b/src/buildtool/storage/local_cas.tpp
index 29bf28f5..ebec5a00 100644
--- a/src/buildtool/storage/local_cas.tpp
+++ b/src/buildtool/storage/local_cas.tpp
@@ -15,6 +15,8 @@
#ifndef INCLUDED_SRC_BUILDTOOL_STORAGE_LOCAL_CAS_TPP
#define INCLUDED_SRC_BUILDTOOL_STORAGE_LOCAL_CAS_TPP
+// IWYU pragma: private, include "src/buildtool/storage/local_cas.hpp"
+
#include <cstddef>
#include <utility> // std::move
diff --git a/src/buildtool/storage/target_cache.hpp b/src/buildtool/storage/target_cache.hpp
index a45d3999..9dc30d11 100644
--- a/src/buildtool/storage/target_cache.hpp
+++ b/src/buildtool/storage/target_cache.hpp
@@ -160,6 +160,6 @@ using ActiveTargetCache = TargetCache<true>;
#endif // BOOTSTRAP_BUILD_TOOL
// NOLINTNEXTLINE(misc-header-include-cycle)
-#include "src/buildtool/storage/target_cache.tpp"
+#include "src/buildtool/storage/target_cache.tpp" // IWYU pragma: export
#endif // INCLUDED_SRC_BUILDTOOL_STORAGE_TARGET_CACHE_HPP
diff --git a/src/buildtool/storage/target_cache.tpp b/src/buildtool/storage/target_cache.tpp
index c31fa1cc..6ce20300 100644
--- a/src/buildtool/storage/target_cache.tpp
+++ b/src/buildtool/storage/target_cache.tpp
@@ -15,6 +15,8 @@
#ifndef INCLUDED_SRC_BUILDTOOL_STORAGE_TARGET_CACHE_TPP
#define INCLUDED_SRC_BUILDTOOL_STORAGE_TARGET_CACHE_TPP
+// IWYU pragma: private, include "src/buildtool/storage/target_cache.hpp"
+
#include <exception>
#include <tuple> //std::ignore