Change dyn_cast for reference types to be more like pointers and not need the canonical type. Also fix so that we're not expecting a return value from a void function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39954 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed