mirror of
https://github.com/google/googletest.git
synced 2025-03-10 17:36:10 +00:00
Fixes the comment about GTEST_ATTRIBUTE_UNUSED_.
This commit is contained in:
parent
5f7c33d39c
commit
0da92aaf7f
@ -96,8 +96,8 @@
|
|||||||
//
|
//
|
||||||
// Macros for basic C++ coding:
|
// Macros for basic C++ coding:
|
||||||
// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
|
// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
|
||||||
// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances don't have to
|
// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a
|
||||||
// be used.
|
// variable don't have to be used.
|
||||||
// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
|
// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
|
||||||
// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
|
// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
|
||||||
//
|
//
|
||||||
@ -447,6 +447,9 @@
|
|||||||
// struct Foo {
|
// struct Foo {
|
||||||
// Foo() { ... }
|
// Foo() { ... }
|
||||||
// } GTEST_ATTRIBUTE_UNUSED_;
|
// } GTEST_ATTRIBUTE_UNUSED_;
|
||||||
|
//
|
||||||
|
// Also use it after a variable or parameter declaration to tell the
|
||||||
|
// compiler the variable/parameter does not have to be used.
|
||||||
#if defined(__GNUC__) && !defined(COMPILER_ICC)
|
#if defined(__GNUC__) && !defined(COMPILER_ICC)
|
||||||
#define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
|
#define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user