clang was crashing with -Wthread-safety due to the incorrect construction of the CFG when dealing with C++ lifetime-extending constructs.
struct Holder { virtual ~Holder() throw() {} int i = 0; }; int main() { const auto &value = Holder().i; }
This patch fixes the crash by correctly identifying the destructor.
Simple ty->isReferenceType() should work as well (the overloaded operator ->() in QualType).