[PATCH] D45643: [Failing one test] Reword [-Wreturn-type] messages to "non-void x does not return a value"
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 13 18:22:15 PDT 2018
rsmith added inline comments.
================
Comment at: bindings/python/tests/cindex/test_diagnostics.py:18
self.assertEqual(tu.diagnostics[0].spelling,
- 'control reaches end of non-void function')
+ 'non-void function does not return a value')
----------------
It seems like part of the problem here is that "non-void function" is sort-of nonsense due to a few missing words. How about:
> "control can reach end of function with non-void return type"
or similar?
I think we still need the mention of control flow, because we're *not* saying the function contains no return statements, we're saying there's a control flow path that reaches the end of the function.
================
Comment at: docs/DiagnosticsReference.rst:9097
| |+--------------------+| |
+---------------------------------------------------+----------------------+-----------------------------------------------------------------+
----------------
This is a generated file; please don't manually update it. (Though we should regenerate it, it's probably quite stale...)
Repository:
rC Clang
https://reviews.llvm.org/D45643
More information about the cfe-commits
mailing list