Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1052)

Unified Diff: testing/gmock/include/gmock/gmock-more-actions.h

Issue 3427004: clang: update gtest/gmock (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: yakshave Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/gmock/include/gmock/gmock-matchers.h ('k') | testing/gmock/include/gmock/gmock-printers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/gmock/include/gmock/gmock-more-actions.h
diff --git a/testing/gmock/include/gmock/gmock-more-actions.h b/testing/gmock/include/gmock/gmock-more-actions.h
index 6226392d714da5a214d92944ae2ff38994b59bab..6d686cd1e414a44dce4b9f014ba129c8904f73c3 100644
--- a/testing/gmock/include/gmock/gmock-more-actions.h
+++ b/testing/gmock/include/gmock/gmock-more-actions.h
@@ -162,7 +162,7 @@ ACTION_TEMPLATE(SetArgReferee,
// Ensures that argument #k is a reference. If you get a compiler
// error on the next line, you are using SetArgReferee<k>(value) in
// a mock function whose k-th (0-based) argument is not a reference.
- GMOCK_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,
+ GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,
SetArgReferee_must_be_used_with_a_reference_argument);
::std::tr1::get<k>(args) = value;
}
@@ -198,7 +198,17 @@ ACTION_TEMPLATE(DeleteArg,
// Action Throw(exception) can be used in a mock function of any type
// to throw the given exception. Any copyable value can be thrown.
#if GTEST_HAS_EXCEPTIONS
+
+// Suppresses the 'unreachable code' warning that VC generates in opt modes.
+#ifdef _MSC_VER
+#pragma warning(push) // Saves the current warning state.
+#pragma warning(disable:4702) // Temporarily disables warning 4702.
+#endif
ACTION_P(Throw, exception) { throw exception; }
+#ifdef _MSC_VER
+#pragma warning(pop) // Restores the warning state.
+#endif
+
#endif // GTEST_HAS_EXCEPTIONS
#ifdef _MSC_VER
« no previous file with comments | « testing/gmock/include/gmock/gmock-matchers.h ('k') | testing/gmock/include/gmock/gmock-printers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698