Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Handle asserts more intelligently. #6543

Open Quuxplusone opened 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR6073
Status NEW
Importance P enhancement
Reported by Daniel Dunbar (daniel@zuster.org)
Reported on 2010-01-18 11:26:05 -0800
Last modified on 2018-10-10 07:42:55 -0700
Version unspecified
Hardware PC All
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
I would like the static analyzer to handle assert statements more intelligently:
 1. It would be nice to always analyze asserts, even in release builds.
 2. It would be nice to have assert specific checks:
   a. Warn about side effects which wouldn't be present in release builds.
   b. Warn about variables only used in the assert, so that release specific warnings will be detected, in any configuration.
Quuxplusone commented 14 years ago

This would require some kind of magic so that we captured the assert statement before it went through the standard platform specific assert.h, or something.

Quuxplusone commented 12 years ago
This is also useful if the compiler optimizers become smart enough to optimize
based on assertions.

See also:
  http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt