Skip to content
Snippets Groups Projects
Commit 02d64792 authored by kosak's avatar kosak
Browse files

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
parent 53d49dc4
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment