Merge branch 'master' into master
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Authors: wan@google.com (Zhanyong Wan)
|
||||
//
|
||||
// Low-level types and utilities for porting Google Test to various
|
||||
// platforms. All macros ending with _ and symbols defined in an
|
||||
// internal namespace are subject to change without notice. Code
|
||||
@@ -329,6 +327,22 @@
|
||||
# define GTEST_DISABLE_MSC_WARNINGS_POP_()
|
||||
#endif
|
||||
|
||||
// Clang on Windows does not understand MSVC's pragma warning.
|
||||
// We need clang-specific way to disable function deprecation warning.
|
||||
#ifdef __clang__
|
||||
# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"")
|
||||
#define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
|
||||
_Pragma("clang diagnostic pop")
|
||||
#else
|
||||
# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
|
||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
|
||||
# define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
|
||||
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
||||
#endif
|
||||
|
||||
#ifndef GTEST_LANG_CXX11
|
||||
// gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when
|
||||
// -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a
|
||||
@@ -533,7 +547,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
#ifndef GTEST_HAS_STD_WSTRING
|
||||
// The user didn't tell us whether ::std::wstring is available, so we need
|
||||
// to figure it out.
|
||||
// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
|
||||
// FIXME: uses autoconf to detect whether ::std::wstring
|
||||
// is available.
|
||||
|
||||
// Cygwin 1.7 and below doesn't support ::std::wstring.
|
||||
@@ -745,7 +759,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
// Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
|
||||
// which is #included by <tr1/tuple>, to not compile when RTTI is
|
||||
// disabled. _TR1_FUNCTIONAL is the header guard for
|
||||
// <tr1/functional>. Hence the following #define is a hack to prevent
|
||||
// <tr1/functional>. Hence the following #define is used to prevent
|
||||
// <tr1/functional> from being included.
|
||||
# define _TR1_FUNCTIONAL 1
|
||||
# include <tr1/tuple>
|
||||
@@ -1250,7 +1264,7 @@ class GTEST_API_ RE {
|
||||
// PartialMatch(str, re) returns true iff regular expression re
|
||||
// matches a substring of str (including str itself).
|
||||
//
|
||||
// TODO(wan@google.com): make FullMatch() and PartialMatch() work
|
||||
// FIXME: make FullMatch() and PartialMatch() work
|
||||
// when str contains NUL characters.
|
||||
static bool FullMatch(const ::std::string& str, const RE& re) {
|
||||
return FullMatch(str.c_str(), re);
|
||||
@@ -1277,7 +1291,7 @@ class GTEST_API_ RE {
|
||||
void Init(const char* regex);
|
||||
|
||||
// We use a const char* instead of an std::string, as Google Test used to be
|
||||
// used where std::string is not available. TODO(wan@google.com): change to
|
||||
// used where std::string is not available. FIXME: change to
|
||||
// std::string.
|
||||
const char* pattern_;
|
||||
bool is_valid_;
|
||||
@@ -2484,7 +2498,7 @@ inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
|
||||
|
||||
// Functions deprecated by MSVC 8.0.
|
||||
|
||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996 /* deprecated function */)
|
||||
GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
|
||||
|
||||
inline const char* StrNCpy(char* dest, const char* src, size_t n) {
|
||||
return strncpy(dest, src, n);
|
||||
@@ -2532,7 +2546,7 @@ inline const char* GetEnv(const char* name) {
|
||||
#endif
|
||||
}
|
||||
|
||||
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
||||
GTEST_DISABLE_MSC_DEPRECATED_POP_()
|
||||
|
||||
#if GTEST_OS_WINDOWS_MOBILE
|
||||
// Windows CE has no C library. The abort() function is used in
|
||||
@@ -2670,7 +2684,7 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
|
||||
// Parses 'str' for a 32-bit signed integer. If successful, writes the result
|
||||
// to *value and returns true; otherwise leaves *value unchanged and returns
|
||||
// false.
|
||||
// TODO(chandlerc): Find a better way to refactor flag and environment parsing
|
||||
// FIXME: Find a better way to refactor flag and environment parsing
|
||||
// out of both gtest-port.cc and gtest.cc to avoid exporting this utility
|
||||
// function.
|
||||
bool ParseInt32(const Message& src_text, const char* str, Int32* value);
|
||||
|
||||
Reference in New Issue
Block a user