You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1936,6 +1937,16 @@ class TestFunctions : public TestFixture {
1936
1937
ASSERT_EQUALS("", errout_str());
1937
1938
}
1938
1939
1940
+
voidcheckMissingReturn9() {
1941
+
check("struct S { int v; };\n"
1942
+
" S operator/(S x, S y) { return { x.v / y.v }; }\n"
1943
+
" S f(int a, int b) {\n"
1944
+
" if (b) { return S{ a } / S{ b }; }\n"
1945
+
" else { return {}; }\n"
1946
+
"}\n");
1947
+
ASSERT_EQUALS("", errout_str());
1948
+
}
1949
+
1939
1950
voidcheckMissingReturnStdInt() {// #14482 - FN
1940
1951
check("std::int32_t f() {}\n");
1941
1952
ASSERT_EQUALS("[test.cpp:1:19]: (error) Found an exit path from function with non-void return type that has missing return statement [missingReturn]\n", errout_str());
0 commit comments