Skip to content

Commit 2750196

Browse files
authored
CXX-2367 Apply clangd IWYU export pragmas to transitive includes (#1492)
1 parent ddb80b3 commit 2750196

File tree

353 files changed

+763
-635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+763
-635
lines changed

src/bsoncxx/include/bsoncxx/v1/array/value.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/array/value-fwd.hpp>
17+
#include <bsoncxx/v1/array/value-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

2121
#include <bsoncxx/v1/detail/prelude.hpp>
2222

23-
#include <bsoncxx/v1/array/view.hpp>
24-
#include <bsoncxx/v1/config/export.hpp>
25-
#include <bsoncxx/v1/document/value.hpp>
23+
#include <bsoncxx/v1/array/view.hpp> // IWYU pragma: export
24+
#include <bsoncxx/v1/detail/type_traits.hpp>
25+
#include <bsoncxx/v1/document/value.hpp> // IWYU pragma: export
2626

27+
#include <cstddef>
2728
#include <cstdint>
2829
#include <type_traits>
2930
#include <utility>

src/bsoncxx/include/bsoncxx/v1/array/view.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/array/view-fwd.hpp>
17+
#include <bsoncxx/v1/array/view-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

2121
#include <bsoncxx/v1/detail/prelude.hpp>
2222

2323
#include <bsoncxx/v1/config/export.hpp>
24-
#include <bsoncxx/v1/document/view.hpp>
25-
#include <bsoncxx/v1/element/view.hpp>
24+
#include <bsoncxx/v1/document/view.hpp> // IWYU pragma: export
25+
#include <bsoncxx/v1/element/view.hpp> // IWYU pragma: export
2626

2727
#include <cstddef>
2828
#include <cstdint>

src/bsoncxx/include/bsoncxx/v1/decimal128.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/decimal128-fwd.hpp>
17+
#include <bsoncxx/v1/decimal128-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

@@ -24,6 +24,7 @@
2424
#include <bsoncxx/v1/stdx/string_view.hpp>
2525

2626
#include <cstdint>
27+
#include <string>
2728
#include <system_error>
2829
#include <type_traits>
2930

src/bsoncxx/include/bsoncxx/v1/detail/bit.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
#include <bsoncxx/v1/detail/prelude.hpp>
1818

19-
#include <bsoncxx/v1/config/config.hpp>
20-
2119
#if defined(__has_include)
2220
#if __has_include(<bit>) && (!defined(_MSVC_LANG) || _MSVC_LANG >= 202002L)
21+
2322
// Prioritize using std::endian from C++20.
24-
#include <bit>
23+
#include <bit> // IWYU pragma: export
24+
2525
#endif // __has_include(<bit>) && (!defined(_MSVC_LANG) || _MSVC_LANG >= 202002L)
2626
#elif defined(_WIN32)
2727
// Forward-compatibility with STL: https://github.com/microsoft/STL/blob/vs-2019-16.5/stl/inc/bit#L26

src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#include <bsoncxx/v1/detail/type_traits.hpp>
2121

2222
#include <cstddef>
23-
#include <functional>
24-
#include <type_traits>
23+
#include <utility>
2524

2625
namespace bsoncxx {
2726
namespace detail {

src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
#include <bsoncxx/v1/detail/macros.hpp>
2020

21-
#include <type_traits>
21+
#include <cstddef>
22+
#include <type_traits> // IWYU pragma: export
2223
#include <utility>
2324

2425
namespace bsoncxx {

src/bsoncxx/include/bsoncxx/v1/document/value.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/document/value-fwd.hpp>
17+
#include <bsoncxx/v1/document/value-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

2121
#include <bsoncxx/v1/detail/prelude.hpp>
2222

2323
#include <bsoncxx/v1/config/export.hpp>
2424
#include <bsoncxx/v1/detail/type_traits.hpp>
25-
#include <bsoncxx/v1/document/view.hpp>
26-
#include <bsoncxx/v1/element/view.hpp>
25+
#include <bsoncxx/v1/document/view.hpp> // IWYU pragma: export
26+
#include <bsoncxx/v1/element/view.hpp> // IWYU pragma: export
27+
#include <bsoncxx/v1/stdx/string_view.hpp>
2728

2829
#include <cstddef>
30+
#include <cstdint>
2931
#include <cstring>
3032
#include <functional>
3133
#include <memory>

src/bsoncxx/include/bsoncxx/v1/document/view.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/document/view-fwd.hpp>
17+
#include <bsoncxx/v1/document/view-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

2121
#include <bsoncxx/v1/detail/prelude.hpp>
2222

2323
#include <bsoncxx/v1/config/export.hpp>
2424
#include <bsoncxx/v1/detail/bit.hpp>
25-
#include <bsoncxx/v1/element/view.hpp>
25+
#include <bsoncxx/v1/element/view.hpp> // IWYU pragma: export
2626
#include <bsoncxx/v1/stdx/string_view.hpp>
2727

2828
#include <cstddef>

src/bsoncxx/include/bsoncxx/v1/element/view.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/element/view-fwd.hpp>
17+
#include <bsoncxx/v1/element/view-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

src/bsoncxx/include/bsoncxx/v1/exception.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#pragma once
1616

17-
#include <bsoncxx/v1/exception-fwd.hpp>
17+
#include <bsoncxx/v1/exception-fwd.hpp> // IWYU pragma: export
1818

1919
//
2020

0 commit comments

Comments
 (0)