summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-01-11 15:41:31 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-01-11 16:02:23 +0000
commitd87a76c9dae38b2a1ef63584aee82e74490dc83b (patch)
tree54c30cc8bffd58a75ac1e7947521a87551dc2386
parent16c53ffcb9d040f0396bf1ab42ca366f7e1f1e4d (diff)
downloadbcm5719-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.
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp2
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) {
OpenPOWER on IntegriCloud