What steps will reproduce the problem?
1. Build a gtest with clang and specify the -Wmissing-noreturn warning with -Werror.
2. The test will fail to compile with:
external/gtest/include/gtest/internal/gtest-port.h:1816:21: error: function 'Abort' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]
inline void Abort() { abort(); }
What version of Google Test are you using? On what operating system?
Building Android (which has gtest 1.7.0) on a Linux host.
The following is sufficient to fix the problem:
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -1813,6 +1813,7 @@ inline const char* GetEnv(const char* name) {
// imitation of standard behaviour.
void Abort();
#else
+void Abort() __attribute__((noreturn));
inline void Abort() { abort(); }
#endif // GTEST_OS_WINDOWS_MOBILE
Thanks,
Ian