Fix "pointer is null" static analyzer warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 13 Jan 2020 14:31:03 +0000 (14:31 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 13 Jan 2020 15:07:56 +0000 (15:07 +0000)
commit40311f9724953541ab7b755fb6a96b31c1e63f00
tree9e7f6bea6e515f89789bdb7d1d0e367244ec71d1
parent7af67259cdd66811941514a263dd0f81c491d8f1
Fix "pointer is null" static analyzer warnings. NFCI.

Use castAs<> instead of getAs<> since the pointers are always dereferenced and castAs will perform the null assertion for us.
clang/lib/AST/ASTContext.cpp