From a3458809fc1631ef127c0e836e4db2264677e948 Mon Sep 17 00:00:00 2001 From: Evan Shrubsole Date: Tue, 30 Apr 2024 10:27:42 +0000 Subject: [PATCH] Add IWYU export pragmas to gtest/gmock This prevents clangd from complaining about unused includes from test/gmock.h and test/gtest.h Bug: b/42226242 Change-Id: I2bd0f61f63981dff697d60f353d198fd81ab1457 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349480 Reviewed-by: Harald Alvestrand Commit-Queue: Harald Alvestrand Auto-Submit: Evan Shrubsole Cr-Commit-Position: refs/heads/main@{#42200} --- test/gmock.h | 2 +- test/gtest.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/gmock.h b/test/gmock.h index f137d080a4..9621e3e1b2 100644 --- a/test/gmock.h +++ b/test/gmock.h @@ -14,7 +14,7 @@ #include "rtc_base/ignore_wundef.h" RTC_PUSH_IGNORING_WUNDEF() -#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gmock/include/gmock/gmock.h" // IWYU pragma: export RTC_POP_IGNORING_WUNDEF() #endif // TEST_GMOCK_H_ diff --git a/test/gtest.h b/test/gtest.h index fa4396420e..68948e0df4 100644 --- a/test/gtest.h +++ b/test/gtest.h @@ -14,8 +14,10 @@ #include "rtc_base/ignore_wundef.h" RTC_PUSH_IGNORING_WUNDEF() +// IWYU pragma: begin_exports #include "testing/gtest/include/gtest/gtest-spi.h" #include "testing/gtest/include/gtest/gtest.h" +// IWYU pragma: end_exports RTC_POP_IGNORING_WUNDEF() // GTEST_HAS_DEATH_TEST is set to 1 when death tests are supported, but appears