Skip to content

Commit 4b883e4

Browse files
tkoeppecopybara-github
authored andcommitted
IWYU pragmas for "caster" headers
E.g. see https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md. PiperOrigin-RevId: 575331556
1 parent f6ff925 commit 4b883e4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

pybind11_abseil/absl_casters.h

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
//
2828
// Author: Ken Oslund
2929

30+
// This header declares template specializations, and thus its use may
31+
// not be visible to inclusion analysis tools, but we must retain it.
32+
// IWYU pragma: always_keep
33+
3034
#ifndef PYBIND11_ABSEIL_ABSL_CASTERS_H_
3135
#define PYBIND11_ABSEIL_ABSL_CASTERS_H_
3236

pybind11_abseil/status_casters.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@
1414
// For details, see the README.md.
1515
//
1616
// Author: Ken Oslund (kenoslund@)
17+
18+
// This header declares template specializations, and thus its use may
19+
// not be visible to inclusion analysis tools, but we must retain it.
20+
// IWYU pragma: always_keep
21+
1722
#ifndef PYBIND11_ABSEIL_STATUS_CASTERS_H_
1823
#define PYBIND11_ABSEIL_STATUS_CASTERS_H_
1924

20-
#include "pybind11_abseil/status_caster.h"
21-
#include "pybind11_abseil/statusor_caster.h"
22-
#include "pybind11_abseil/import_status_module.h"
25+
#include "pybind11_abseil/status_caster.h" // IWYU pragma: export
26+
#include "pybind11_abseil/statusor_caster.h" // IWYU pragma: export
27+
#include "pybind11_abseil/import_status_module.h" // IWYU pragma: export
2328

2429
#endif // PYBIND11_ABSEIL_STATUS_CASTERS_H_

0 commit comments

Comments
 (0)