summaryrefslogtreecommitdiff
path: root/compilerplugins/README
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-10-09 16:21:33 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-09 17:25:27 +0200
commitd4aa136e975b150add5f32013ea37aa68e9ccb57 (patch)
tree6e0aec50278fd33862b592d12d0be6307a644d96 /compilerplugins/README
parent76757ebd98df1e08d00282cb96312b5be7690d16 (diff)
compiler plugin check for if/while/true bodies with possibly {} missing
Change-Id: Ia84c70006b0b8a039b6fea27f3c5cde796f25d03
Diffstat (limited to 'compilerplugins/README')
-rw-r--r--compilerplugins/README12
1 files changed, 12 insertions, 0 deletions
diff --git a/compilerplugins/README b/compilerplugins/README
index 2430d40fb72e..50c7505dd72e 100644
--- a/compilerplugins/README
+++ b/compilerplugins/README
@@ -28,6 +28,18 @@ All warnings and errors are marked '[loplugin]' in the message.
Additional check for unused variables.
+==== Body of if/while/for not in {} ====
+
+- statement aligned as second statement in if/while/for body but not in a statement block [loplugin]
+
+Warn about the following construct:
+
+ if( a != 0 )
+ b = 2;
+ c = 3;
+
+Here either both statements should be inside {} or the second statement in indented wrong.
+
== Code documentation / howtos ==