The cast of a pointer to a different address space makes clang implement an implicit cast during SEMA that was not getting the right CastKind information. This caused the code emission to fail later on. This patch adds an extra check before the creation of the cast and fixes the kind if the types are pointers and the address spaces differ.
This is a fix for http://llvm.org/bugs/show_bug.cgi?id=20135.
Typo "no" -> "not"