diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-01-11 15:41:31 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-01-11 16:02:23 +0000 |
commit | d87a76c9dae38b2a1ef63584aee82e74490dc83b (patch) | |
tree | 54c30cc8bffd58a75ac1e7947521a87551dc2386 /clang/lib | |
parent | 16c53ffcb9d040f0396bf1ab42ca366f7e1f1e4d (diff) | |
download | bcm5719-llvm-d87a76c9dae38b2a1ef63584aee82e74490dc83b.tar.gz bcm5719-llvm-d87a76c9dae38b2a1ef63584aee82e74490dc83b.zip |
Fix "pointer is null" static analyzer warning. NFCI.
Use castAs<> instead of getAs<> since the pointer is dereferenced immediately within mangleCallingConvention and castAs will perform the null assertion for us.
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 91413ae28e9..a286c533558 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -710,7 +710,7 @@ void MicrosoftCXXNameMangler::mangleVirtualMemPtrThunk( Out << "$B"; mangleNumber(OffsetInVFTable); Out << 'A'; - mangleCallingConvention(MD->getType()->getAs<FunctionProtoType>()); + mangleCallingConvention(MD->getType()->castAs<FunctionProtoType>()); } void MicrosoftCXXNameMangler::mangleName(const NamedDecl *ND) { |