summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2021-12-07 23:08:42 (GMT)
committerCopybara-Service <copybara-worker@google.com>2021-12-07 23:09:13 (GMT)
commit4c5650f68866e3c2e60361d5c4c95c6f335fb64b (patch)
treeca7f70ad6d2ac96f8d758edc7b7c01faeca065ab /googletest/include/gtest/internal/gtest-port.h
parentd61d4d8e64c08a662055e82904bbf90e108a704f (diff)
downloadgoogletest-4c5650f68866e3c2e60361d5c4c95c6f335fb64b.zip
googletest-4c5650f68866e3c2e60361d5c4c95c6f335fb64b.tar.gz
googletest-4c5650f68866e3c2e60361d5c4c95c6f335fb64b.tar.bz2
Add NOLINT to address modernize-use-trailing-return-type in TEST_F uses
Example command: ``` clang_tidy '--config={Checks: "modernize-use-trailing-return-type"}' googletest-death-test-test.cc ``` Example error: ``` warning: use a trailing return type for this function [modernize-use-trailing-return-type] TEST(NotADeathTest, Test) { ^ ``` PiperOrigin-RevId: 414836261 Change-Id: I5f758423667559abfbf313190543666bc4ce0e6e
Diffstat (limited to 'googletest/include/gtest/internal/gtest-port.h')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index cc6fa6b..619498f 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -689,25 +689,29 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
+// NOLINT is for modernize-use-trailing-return-type in macro uses.
#define GTEST_DISALLOW_ASSIGN_(type) \
- type& operator=(type const &) = delete
+ type& operator=(type const&) = delete /* NOLINT */
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
+// NOLINT is for modernize-use-trailing-return-type in macro uses.
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
type(type const&) = delete; \
- type& operator=(type const&) = delete
+ type& operator=(type const&) = delete /* NOLINT */
// A macro to disallow move operator=
// This should be used in the private: declarations for a class.
+// NOLINT is for modernize-use-trailing-return-type in macro uses.
#define GTEST_DISALLOW_MOVE_ASSIGN_(type) \
- type& operator=(type &&) noexcept = delete
+ type& operator=(type&&) noexcept = delete /* NOLINT */
// A macro to disallow move constructor and operator=
// This should be used in the private: declarations for a class.
+// NOLINT is for modernize-use-trailing-return-type in macro uses.
#define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \
type(type&&) noexcept = delete; \
- type& operator=(type&&) noexcept = delete
+ type& operator=(type&&) noexcept = delete /* NOLINT */
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations