[SemaDecl] Use castAs<> instead of getAs<> to avoid dereference of nullptr
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 10 Jan 2022 16:28:04 +0000 (16:28 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 10 Jan 2022 16:31:08 +0000 (16:31 +0000)
commit4e77868c7c4ba79ed025b87f84ce66fc8dca25d6
treeabd19d93c9a7596e8b219add77f94766f5f9dc53
parent39f75ab6a7e3aa04cf80c218f4bb2ef331ce3d48
[SemaDecl] Use castAs<> instead of getAs<> to avoid dereference of nullptr

This will assert the cast is correct instead of returning nullptr
clang/lib/Sema/SemaDecl.cpp