[PATCH] D16200: Add --force-analyze-debug-code option to scan-build to force debug build and hopefully enable more precise warnings.

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 09:53:39 PST 2016


zaks.anna added a comment.

See some nits below. Otherwise, LGTM.

Thank you!
Anna.


================
Comment at: tools/scan-build-py/libscanbuild/analyze.py:463
@@ +462,3 @@
+        help="""Tells analyzer to enable assertions in code even if they were
+                disabled during compilation (to enable more precise
+                results).""")
----------------
"(to enable more precise results)" -> enabling more precise results

================
Comment at: tools/scan-build-py/libscanbuild/runner.py:169
@@ +168,3 @@
+def force_analyze_debug_code(cmd):
+    """ Remove definition of NDEBUG from command to enable assert()'s. """
+    cmd.append('-UNDEBUG')
----------------
Please, update or remove the comment.

================
Comment at: tools/scan-build-py/tests/unit/test_runner.py:222
@@ +221,3 @@
+                (['-Dkey=val'], ['-Dkey=val', '-UNDEBUG']),
+                (['-D', 'NDEBUG'], ['-D', 'NDEBUG', '-UNDEBUG']) ]:
+            sut.force_analyze_debug_code(a)
----------------
Is '-' missing in front of NDEBUG?

================
Comment at: tools/scan-build/bin/scan-build:1126
@@ +1125,3 @@
+   Tells analyzer to enable assertions in code even if they were disabled
+   during compilation (to enable more precise results).
+
----------------
please remove '('.


Repository:
  rL LLVM

http://reviews.llvm.org/D16200





More information about the llvm-commits mailing list