diff --git a/llvm/utils/unittest/googlemock/README.LLVM b/llvm/utils/unittest/googlemock/README.LLVM --- a/llvm/utils/unittest/googlemock/README.LLVM +++ b/llvm/utils/unittest/googlemock/README.LLVM @@ -20,3 +20,4 @@ * Support for std::begin/std::end in gmock-matchers.h * IWYU pragmas * Disabled -Wdeprecated-copy for clang +* Added IWYU pragmas from https://github.com/google/googletest/commit/100f6fbf5f81a82d163c1e29735e8a2936eacd4f diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // Google Mock - a framework for writing C++ mock classes. // // This file implements some commonly used actions. @@ -35,6 +34,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h @@ -37,6 +37,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h @@ -33,6 +33,9 @@ // GOOGLETEST_CM0002 DO NOT DELETE +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + #ifndef THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_ // NOLINT #define THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_ // NOLINT diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h @@ -40,6 +40,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h @@ -35,6 +35,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // Google Mock - a framework for writing C++ mock classes. // // This file implements some matchers that depend on gmock-generated-matchers.h. @@ -38,6 +37,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_ #define GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // Implements class templates NiceMock, NaggyMock, and StrictMock. // // Given a mock class MockFoo that is created using Google Mock, @@ -60,6 +59,9 @@ // GOOGLETEST_CM0002 DO NOT DELETE +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // Google Mock - a framework for writing C++ mock classes. // // This file implements the ON_CALL() and EXPECT_CALL() macros. @@ -59,6 +58,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ #define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock.h b/llvm/utils/unittest/googlemock/include/gmock/gmock.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // Google Mock - a framework for writing C++ mock classes. // // This is the main header file a user should include. @@ -67,6 +66,7 @@ #include "gmock/gmock-more-matchers.h" #include "gmock/gmock-nice-strict.h" #include "gmock/internal/gmock-internal-utils.h" +#include "gmock/internal/gmock-port.h" #ifdef __clang__ #if __has_warning("-Wdeprecated-copy") diff --git a/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h --- a/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +++ b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h @@ -4,6 +4,9 @@ // GOOGLETEST_CM0002 DO NOT DELETE +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h --- a/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h +++ b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h @@ -31,6 +31,9 @@ // // GOOGLETEST_CM0002 DO NOT DELETE +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h --- a/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h +++ b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h @@ -33,6 +33,9 @@ // GOOGLETEST_CM0002 DO NOT DELETE +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h --- a/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -37,6 +37,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ #define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ diff --git a/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h --- a/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h +++ b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// // Low-level types and utilities for porting Google Mock to various // platforms. All macros ending with _ and symbols defined in an // internal namespace are subject to change without notice. Code @@ -38,6 +37,7 @@ // GOOGLETEST_CM0002 DO NOT DELETE // IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ #define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ diff --git a/llvm/utils/unittest/googletest/README.LLVM b/llvm/utils/unittest/googletest/README.LLVM --- a/llvm/utils/unittest/googletest/README.LLVM +++ b/llvm/utils/unittest/googletest/README.LLVM @@ -19,3 +19,4 @@ * Added support for NetBSD, Minix and Haiku. * Added raw_os_ostream support to include/gtest/internal/custom/gtest-printers.h. * Added StringRef support to include/gtest/internal/custom/gtest-printers.h. +* Added IWYU pragmas from https://github.com/google/googletest/commit/100f6fbf5f81a82d163c1e29735e8a2936eacd4f diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h b/llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h @@ -35,6 +35,10 @@ // directly. // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ #define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h b/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h @@ -32,9 +32,9 @@ // This file implements just enough of the matcher interface to allow // EXPECT_DEATH and friends to accept a matcher argument. -// IWYU pragma: private, include "testing/base/public/gunit.h" -// IWYU pragma: friend third_party/googletest/googlemock/.* -// IWYU pragma: friend third_party/googletest/googletest/.* +// // IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* #ifndef GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_ #define GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-message.h b/llvm/utils/unittest/googletest/include/gtest/gtest-message.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-message.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-message.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// // The Google C++ Testing and Mocking Framework (Google Test) // // This header file defines the Message class. @@ -44,6 +43,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h b/llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h @@ -33,6 +33,11 @@ // This file is generated by a SCRIPT. DO NOT EDIT BY HAND! // // GOOGLETEST_CM0001 DO NOT DELETE + +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ #define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-printers.h b/llvm/utils/unittest/googletest/include/gtest/gtest-printers.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-printers.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-printers.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // Google Test - The Google C++ Testing and Mocking Framework // // This file implements a universal value printer that can print a @@ -97,6 +96,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ #define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-spi.h b/llvm/utils/unittest/googletest/include/gtest/gtest-spi.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-spi.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-spi.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// // Utilities for testing Google Test itself and code that uses Google Test // (e.g. frameworks built on top of Google Test). diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h b/llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h @@ -29,6 +29,10 @@ // // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ #define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h b/llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h @@ -27,6 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* // GOOGLETEST_CM0001 DO NOT DELETE diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest.h b/llvm/utils/unittest/googletest/include/gtest/gtest.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// // The Google C++ Testing and Mocking Framework (Google Test) // // This header file defines the public API for Google Test. It should be @@ -59,16 +58,16 @@ #include #include -#include "gtest/internal/gtest-internal.h" -#include "gtest/internal/gtest-string.h" #include "gtest/gtest-death-test.h" #include "gtest/gtest-matchers.h" #include "gtest/gtest-message.h" #include "gtest/gtest-param-test.h" #include "gtest/gtest-printers.h" -#include "gtest/gtest_prod.h" #include "gtest/gtest-test-part.h" #include "gtest/gtest-typed-test.h" +#include "gtest/gtest_prod.h" +#include "gtest/internal/gtest-internal.h" +#include "gtest/internal/gtest-string.h" GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ /* class A needs to have dll-interface to be used by clients of class B */) diff --git a/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h b/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h --- a/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h +++ b/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h @@ -33,6 +33,10 @@ // Implements a family of generic predicate assertion macros. // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -33,6 +33,10 @@ // death tests. They are subject to change without notice. // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h @@ -26,7 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + // Google Test filepath utilities // // This header file declares classes and functions used internally by @@ -37,6 +37,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -34,6 +34,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h @@ -32,6 +32,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h @@ -26,12 +26,16 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + // The Google C++ Testing and Mocking Framework (Google Test) // // This header file defines the GTEST_OS_* macro. // It is separate from gtest-port.h so that custom/gtest-port.h can include it. +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h @@ -26,7 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + // Low-level types and utilities for porting Google Test to various // platforms. All macros ending with _ and symbols defined in an // internal namespace are subject to change without notice. Code @@ -40,6 +40,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h @@ -26,7 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + // The Google C++ Testing and Mocking Framework (Google Test) // // This header file declares the String class and functions used internally by @@ -38,6 +38,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h @@ -41,6 +41,10 @@ // GOOGLETEST_CM0001 DO NOT DELETE +// IWYU pragma: private, include "gtest/gtest.h" +// IWYU pragma: friend gtest/.* +// IWYU pragma: friend gmock/.* + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_