SemaType.cpp - use castAs<> instead of getAs<> for dereferenced pointers
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 8 Dec 2020 16:37:05 +0000 (16:37 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 8 Dec 2020 16:37:20 +0000 (16:37 +0000)
commit25f5df7e0bc950ad244e8da000ce4248bd41c140
tree1e3c02ca7b4308a1a95f1e16c1c1b3e1b9c90c8f
parent111ae220a3bff944e10a0760ce344630f4efc40d
SemaType.cpp - use castAs<> instead of getAs<> for dereferenced pointers

Fix static analyzer warnings - castAs<> will assert the type is correct, but getAs<> just returns null, which would just result in a dereferenced null pointer.
clang/lib/Sema/SemaType.cpp