Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
83602c83
Commit
83602c83
authored
Jan 14, 2015
by
kosak
Browse files
Fix build regression with old (Xcode 5.1) clangs.
parent
7489581d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
include/gtest/internal/gtest-port.h
include/gtest/internal/gtest-port.h
+8
-4
No files found.
include/gtest/internal/gtest-port.h
View file @
83602c83
...
@@ -499,10 +499,14 @@ struct _RTL_CRITICAL_SECTION;
...
@@ -499,10 +499,14 @@ struct _RTL_CRITICAL_SECTION;
# endif // _HAS_EXCEPTIONS
# endif // _HAS_EXCEPTIONS
# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
# elif defined(__clang__)
# elif defined(__clang__)
// __EXCEPTIONS determines if cleanups are enabled. In Obj-C++ files, there can
// clang defines __EXCEPTIONS iff exceptions are enabled before clang 220714,
// be cleanups for ObjC exceptions, but C++ exceptions might still be disabled.
// but iff cleanups are enabled after that. In Obj-C++ files, there can be
// So use a __has_feature check for C++ exceptions instead.
// cleanups for ObjC exceptions which also need cleanups, even if C++ exceptions
# define GTEST_HAS_EXCEPTIONS __has_feature(cxx_exceptions)
// are disabled. clang has __has_feature(cxx_exceptions) which checks for C++
// exceptions starting at clang r206352, but which checked for cleanups prior to
// that. To reliably check for C++ exception availability with clang, check for
// __EXCEPTIONS && __has_feature(cxx_exceptions).
# define GTEST_HAS_EXCEPTIONS __EXCEPTIONS && __has_feature(cxx_exceptions)
# elif defined(__GNUC__) && __EXCEPTIONS
# elif defined(__GNUC__) && __EXCEPTIONS
// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
# define GTEST_HAS_EXCEPTIONS 1
# define GTEST_HAS_EXCEPTIONS 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment