[llvm] r368135 - [unittests] Mark private gmock headers with IWYU pragmas. NFC
Ilya Biryukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 01:45:38 PDT 2019
Author: ibiryukov
Date: Wed Aug 7 01:45:38 2019
New Revision: 368135
URL: http://llvm.org/viewvc/llvm-project?rev=368135&view=rev
Log:
[unittests] Mark private gmock headers with IWYU pragmas. NFC
Summary: To prevent clangd from adding #include of those headers.
Reviewers: gribozavr
Reviewed By: gribozavr
Subscribers: kadircet, llvm-commits, cfe-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65849
Modified:
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-actions.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-matchers.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-actions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-actions.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-actions.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-actions.h Wed Aug 7 01:45:38 2019
@@ -33,6 +33,8 @@
//
// This file implements some commonly used actions.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h Wed Aug 7 01:45:38 2019
@@ -35,6 +35,8 @@
// cardinalities can be defined by the user implementing the
// CardinalityInterface interface if necessary.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h Wed Aug 7 01:45:38 2019
@@ -35,6 +35,8 @@
//
// This file implements some commonly used variadic actions.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h Wed Aug 7 01:45:38 2019
@@ -37,6 +37,8 @@
//
// This file implements function mockers of various arities.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h Wed Aug 7 01:45:38 2019
@@ -35,6 +35,8 @@
//
// This file implements some commonly used variadic matchers.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h Wed Aug 7 01:45:38 2019
@@ -68,6 +68,8 @@
// cannot have arguments passed by non-const reference, which are
// banned by the Google C++ style guide anyway.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-matchers.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-matchers.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-matchers.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-matchers.h Wed Aug 7 01:45:38 2019
@@ -35,6 +35,8 @@
// matchers can be defined by the user implementing the
// MatcherInterface<T> interface if necessary.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-actions.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-actions.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-actions.h Wed Aug 7 01:45:38 2019
@@ -33,6 +33,8 @@
//
// This file implements some actions that depend on gmock-generated-actions.h.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h Wed Aug 7 01:45:38 2019
@@ -36,6 +36,8 @@
// Note that tests are implemented in gmock-matchers_test.cc rather than
// gmock-more-matchers-test.cc.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_GMOCK_MORE_MATCHERS_H_
#define GMOCK_GMOCK_MORE_MATCHERS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h Wed Aug 7 01:45:38 2019
@@ -57,6 +57,8 @@
// where all clauses are optional, and .InSequence()/.After()/
// .WillOnce() can appear any number of times.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h Wed Aug 7 01:45:38 2019
@@ -38,6 +38,8 @@
// This file contains template meta-programming utility classes needed
// for implementing Google Mock.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h Wed Aug 7 01:45:38 2019
@@ -35,6 +35,8 @@
// Mock. They are subject to change without notice, so please DO NOT
// USE THEM IN USER CODE.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
Modified: llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-port.h?rev=368135&r1=368134&r2=368135&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-port.h (original)
+++ llvm/trunk/utils/unittest/googlemock/include/gmock/internal/gmock-port.h Wed Aug 7 01:45:38 2019
@@ -36,6 +36,8 @@
// end with _ are part of Google Mock's public API and can be used by
// code outside Google Mock.
+// IWYU pragma: private, include "gmock/gmock.h"
+
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
More information about the llvm-commits
mailing list