llvm / llvm-project

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

Detect violations of static initialization order rules #13760

Open llvmbot opened 12 years ago

llvmbot commented 12 years ago
Bugzilla Link 13388
Version trunk
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

Project Static Analyzer says that developrs are open to feature requests so here's one. From my experience violations of static initialization order are rather common in large databases and many compilers don't issue any warnings on this. This causes hard to find bugs when changing compiler or version which aren't easily detectable.

Adding this check seems to be rather trivial (I guess I could even add myself when I have time) but may have tremendous benefit for C++ community (and probably for Clang itself because AFAIK there are no open-source compilers/analyzers doing anything like this).

llvmbot commented 12 years ago

s/databases/codebases

llvmbot commented 12 years ago

assigned to @tkremenek