-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 9721 |
| Resolution | FIXED |
| Resolved on | May 24, 2011 15:42 |
| Version | trunk |
| OS | All |
| Attachments | simple pathologic file |
| Reporter | LLVM Bugzilla Contributor |
| CC | @tkremenek |
Extended Description
The static analyze asserts and aborts with code using static_assert.
------------ stsh_atom.cpp --------------
void LoadAtom() { static_assert(sizeof(void *) == 8, "stsh_entry_size"); }
$ clang++ -std=c++0x --analyze stsh_atom.cpp
Assertion failed: (false && "Subtype of ScopedDecl not handled."), function VisitDecl, file /Users/jddupas/Projects/OpenSource/llvm/tools/clang/lib/Analysis/../../include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h, line 72.
0 clang 0x0000000100f7b5f2 PrintStackTrace(void*) + 34
1 clang 0x0000000100f7bb49 SignalHandler(int) + 745
2 libSystem.B.dylib 0x00007fff809d566a _sigtramp + 26
3 clang 0x000000010023434b clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*) + 2011
4 clang 0x0000000100013356 abort + 22
5 clang 0x0000000100013318 __assert_rtn + 56
6 clang 0x00000001005a2cde clang::CFGRecStmtDeclVisitor<(anonymous namespace)::RegisterDecls>::VisitDecl(clang::Decl*) + 254
7 clang 0x00000001005a1fe7 clang::StmtVisitor<(anonymous namespace)::RegisterDecls, void>::Visit(clang::Stmt*) + 1303
8 clang 0x000000010059ed07 clang::LiveVariables::LiveVariables(clang::AnalysisContext&, bool) + 471
9 clang 0x000000010058a042 clang::AnalysisContext::getLiveVariables() + 66
[…]
Stack dump:
0. Program arguments: /Users/jddupas/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1 -triple x86_64-apple-darwin10.0.0 -analyze -disable-free -main-file-name stsh_atom.cpp -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=deadcode -analyzer-checker=security -analyzer-checker=unix -analyzer-checker=osx -analyzer-output plist -w -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 97.17 -resource-dir /Users/jddupas/Projects/OpenSource/llvm/release/Release+Asserts/bin/../lib/clang/3.0 -std=c++0x -ferror-limit 19 -fmessage-length 170 -stack-protector 1 -fblocks -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o stsh_atom.plist -x c++ stsh_atom.cpp
- parser at end of file
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 1 (use -v to see invocation)