<div dir="ltr">Hello everyone,<div><br></div><div>I am quite desperate right now finding a bug in my application. I am using clang API to travel through its AST a do some static analysis - just Visitor, no changes. I am getting this:</div><div><br></div><div> /usr/lib/llvm-3.8/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = clang::Expr; Y = clang::Stmt; typename llvm::cast_retty<X, Y*>::ret_type = clang::Expr*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.</div><div>(SIGABRT) (core dumped ...)<br></div><div> </div><div>Some input is fine, some gets this assertion fail. Does anyone have a hint what code could raise this assertion fail?</div><div><br></div><div>I'm using g++ to compile my app, no special flags just c++11. I have Clang version 3.8.1 binaries - libclang-dev via Synaptic on my Xubuntu and on my CentOS I downloaded binaries from web, both gets the same assertion fail.</div><div><br></div><div>Thanks everyone who tries to help,</div><div>Daniel Kraut</div></div>