Fix "pointer is null" static analyzer warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 11 Jan 2020 15:33:25 +0000 (15:33 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 11 Jan 2020 16:02:23 +0000 (16:02 +0000)
commit16c53ffcb9d040f0396bf1ab42ca366f7e1f1e4d
tree7baa4582dae8a0ba3a419684306edeb0af922fb8
parentded237b58d56299f90ef44853ef79b039248b85e
Fix "pointer is null" static analyzer warnings. NFCI.

Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGExprCXX.cpp
clang/lib/CodeGen/CGExprScalar.cpp