Commit 4c5650f6 authored by Abseil Team's avatar Abseil Team Committed by Copybara-Service
Browse files

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
parent d61d4d8e
...@@ -689,25 +689,29 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; ...@@ -689,25 +689,29 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// A macro to disallow copy operator= // A macro to disallow copy operator=
// This should be used in the private: declarations for a class. // 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) \ #define GTEST_DISALLOW_ASSIGN_(type) \
type& operator=(type const &) = delete type& operator=(type const&) = delete /* NOLINT */
// A macro to disallow copy constructor and operator= // A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class. // 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) \ #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
type(type const&) = delete; \ type(type const&) = delete; \
type& operator=(type const&) = delete type& operator=(type const&) = delete /* NOLINT */
// A macro to disallow move operator= // A macro to disallow move operator=
// This should be used in the private: declarations for a class. // 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) \ #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= // A macro to disallow move constructor and operator=
// This should be used in the private: declarations for a class. // 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) \ #define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \
type(type&&) noexcept = delete; \ 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 // Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations // with this macro. The macro should be used on function declarations
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment