Don't dereference a dyn_cast<> result - use cast<> instead. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 8 Nov 2020 13:06:07 +0000 (13:06 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 8 Nov 2020 13:06:07 +0000 (13:06 +0000)
commit8930032f53322405ca2d06cac78b9503542e5b62
tree503dcffac035e63554fc71f89bdb8901a350bda4
parent0fe91ad463fea9d08cbcd640a62aa9ca2d8d05e0
Don't dereference a dyn_cast<> result - use cast<> instead. NFCI.

We were relying on the dyn_cast<> succeeding - better use cast<> and have it assert that its the correct type than dereference a null result.
clang/lib/CodeGen/CodeGenModule.cpp