llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.1k stars 11.6k forks source link

Handle asserts more intelligently. #6445

Open llvmbot opened 14 years ago

llvmbot commented 14 years ago
Bugzilla Link 6073
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

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.
llvmbot 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

llvmbot 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.

llvmbot commented 14 years ago

assigned to @tkremenek