Skip to content

Commit 4c58f07

Browse files
committed
suppress_linemarks(): Also suppress Coverity annotations
Prompted by spotting that `COVERITY` pragmas on assignments caused duplicated annotations in generated code
1 parent 9eb980a commit 4c58f07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/dml/output.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,15 @@ def allow_linemarks():
233233
reset_line_directive()
234234

235235
# Locally set dml.globals.linemarks to be False, even if it were already True
236+
# Will also disable the emission of coverity annotations
236237
@contextmanager
237238
def disallow_linemarks():
238239
prev_linemarks = dml.globals.linemarks
240+
prev_coverity = dml.globals.coverity
239241
dml.globals.linemarks = False
242+
dml.globals.coverity = False
240243
try:
241244
yield
242245
finally:
243246
dml.globals.linemarks = prev_linemarks
247+
dml.globals.coverity = prev_coverity

0 commit comments

Comments
 (0)