[SemaTemplateInstantiate] Use cast<> instead of dyn_cast<> to avoid dereference of...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 11 Jan 2022 11:12:12 +0000 (11:12 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 11 Jan 2022 11:29:38 +0000 (11:29 +0000)
commitfba8ad2b719c14e971dfe16458b3d18c08e0e40d
tree6c589cb95def1761722e67054195f94d927945a0
parent3946095b881366c2f01ebafd18b689337a43aa02
[SemaTemplateInstantiate] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr

The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
clang/lib/Sema/SemaTemplateInstantiate.cpp