summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-03-05 10:28:28 +0000
committerDavid Mitchell <davem@iabyn.com>2015-03-05 10:28:28 +0000
commitf93695f990c755bfd70a59f0ac4caf55173fdb4a (patch)
tree3a54e05830f0ec151a499d3a984eef2a1d010375 /op.c
parentd98e5cdeb3ac2db8525660fbbbe91c811785588c (diff)
downloadperl-f93695f990c755bfd70a59f0ac4caf55173fdb4a.tar.gz
document why S_maybe_multideref is Coverity-safe
Diffstat (limited to 'op.c')
-rw-r--r--op.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/op.c b/op.c
index 5adc78854c..5f251218f0 100644
--- a/op.c
+++ b/op.c
@@ -12227,7 +12227,13 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
* determines whether the op chain is convertible and calculates the
* buffer size; the second pass populates the buffer and makes any
* changes necessary to ops (such as moving consts to the pad on
- * threaded builds)
+ * threaded builds).
+ *
+ * NB: for things like Coverity, note that both passes take the same
+ * path through the logic tree (except for 'if (pass)' bits), since
+ * both passes are following the same op_next chain; and in
+ * particular, if it would return early on the second pass, it would
+ * already have returned early on the first pass.
*/
for (pass = 0; pass < 2; pass++) {
OP *o = orig_o;