File tree 4 files changed +7
-15
lines changed 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -2075,9 +2075,7 @@ class GTEST_API_ ScopedTrace {
2075
2075
2076
2076
ScopedTrace (const ScopedTrace&) = delete ;
2077
2077
ScopedTrace& operator =(const ScopedTrace&) = delete ;
2078
- } GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
2079
- // c'tor and d'tor. Therefore it doesn't
2080
- // need to be used otherwise.
2078
+ };
2081
2079
2082
2080
// Causes a trace (including the source file path, the current line
2083
2081
// number, and the given message) to be included in every test failure
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class GTEST_API_ DeathTest {
99
99
DeathTest* const test_;
100
100
ReturnSentinel (const ReturnSentinel&) = delete ;
101
101
ReturnSentinel& operator =(const ReturnSentinel&) = delete ;
102
- } GTEST_ATTRIBUTE_UNUSED_ ;
102
+ };
103
103
104
104
// An enumeration of possible roles that may be taken when a death
105
105
// test is encountered. EXECUTE means that the death test logic should
Original file line number Diff line number Diff line change @@ -668,17 +668,11 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
668
668
#define GTEST_HAVE_FEATURE_ (x ) 0
669
669
#endif
670
670
671
- // Use this annotation at the end of a struct/class definition to
672
- // prevent the compiler from optimizing away instances that are never
673
- // used. This is useful when all interesting logic happens inside the
674
- // c'tor and / or d'tor. Example:
675
- //
676
- // struct Foo {
677
- // Foo() { ... }
678
- // } GTEST_ATTRIBUTE_UNUSED_;
679
- //
680
- // Also use it after a variable or parameter declaration to tell the
671
+ // Use this annotation after a variable or parameter declaration to tell the
681
672
// compiler the variable/parameter does not have to be used.
673
+ // Example:
674
+ //
675
+ // GTEST_ATTRIBUTE_UNUSED_ int foo = bar();
682
676
#if GTEST_HAVE_ATTRIBUTE_(unused)
683
677
#define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
684
678
#else
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ class GTestFlagSaver {
212
212
int32_t stack_trace_depth_;
213
213
std::string stream_result_to_;
214
214
bool throw_on_failure_;
215
- } GTEST_ATTRIBUTE_UNUSED_ ;
215
+ };
216
216
217
217
// Converts a Unicode code point to a narrow string in UTF-8 encoding.
218
218
// code_point parameter is of type UInt32 because wchar_t may not be
You can’t perform that action at this time.
0 commit comments