zaks.anna added a comment. It's a bug in the checker. dyn_cast should not be called on a null pointer. You could either check for nun or call dyn_cast_or_null. http://reviews.llvm.org/D16044