aboutsummaryrefslogtreecommitdiffstats
path: root/docs/checks/README-returning-void-expression.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/checks/README-returning-void-expression.md')
-rw-r--r--docs/checks/README-returning-void-expression.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/checks/README-returning-void-expression.md b/docs/checks/README-returning-void-expression.md
new file mode 100644
index 00000000..bb405092
--- /dev/null
+++ b/docs/checks/README-returning-void-expression.md
@@ -0,0 +1,14 @@
+# returning-void-expression
+
+Warns when returning a void expression.
+
+Example:
+```
+void doStuff()
+{
+ if (cond)
+ return // Oops, forgot the ; but it still compiles since processStuff() returns void.
+
+ processStuff();
+}
+```