[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 22 09:54:50 PST 2023


Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>,
Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>,
Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>,
Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>,
Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/76249 at github.com>


================
@@ -218,6 +218,13 @@ New checks
   Detects C++ code where a reference variable is used to extend the lifetime
   of a temporary object that has just been constructed.
 
+- New :doc:`readability-avoid-return-with-void-value
+  <clang-tidy/checks/readability/avoid-return-with-void-value>` check.
+
+  Complains about statements returning expressions of type ``void``. It can be
----------------
PiotrZSL wrote:

Consider simplifying description of check make to something like "Finds return statements with void values used within functions with a void result type."

https://github.com/llvm/llvm-project/pull/76249


More information about the cfe-commits mailing list