diff options
author | kosak <kosak@google.com> | 2015-02-14 02:22:21 (GMT) |
---|---|---|
committer | kosak <kosak@google.com> | 2015-02-14 02:22:21 (GMT) |
commit | 02d647925955836d04d90aafb5ae10a092af29bc (patch) | |
tree | 426c08e9e3bd1f26a5b479bbd527b09ecac3256e | |
parent | 53d49dc43ea3f34a61f4a017d33ac5a0b650a68d (diff) | |
download | googletest-02d647925955836d04d90aafb5ae10a092af29bc.zip googletest-02d647925955836d04d90aafb5ae10a092af29bc.tar.gz googletest-02d647925955836d04d90aafb5ae10a092af29bc.tar.bz2 |
This change adds an explicit invocation of std::move to workaround a problem
in VC++'s /analyze compiler that was causing build errors in Chrome:
https://code.google.com/p/googlemock/issues/detail?id=172
-rw-r--r-- | include/gmock/gmock-matchers.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/gmock/gmock-matchers.h b/include/gmock/gmock-matchers.h index ca09756..6450f9b 100644 --- a/include/gmock/gmock-matchers.h +++ b/include/gmock/gmock-matchers.h @@ -2263,8 +2263,15 @@ class PropertyMatcher { *listener << "whose given property is "; // Cannot pass the return value (for example, int) to MatchPrintAndExplain, // which takes a non-const reference as argument. +#if defined(_PREFAST_ ) && _MSC_VER == 1800 + // Workaround bug in VC++ 2013's /analyze parser. + // https://connect.microsoft.com/VisualStudio/feedback/details/1106363/internal-compiler-error-with-analyze-due-to-failure-to-infer-move + posix::Abort(); // To make sure it is never run. + return false; +#else RefToConstProperty result = (obj.*property_)(); return MatchPrintAndExplain(result, matcher_, listener); +#endif } bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p, |