summaryrefslogtreecommitdiff
path: root/lib/AST/Mangle.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-07 13:58:05 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-07 13:58:05 +0000
commitd55e66916d72467ee6c1a2e169a4fbe0296b5400 (patch)
treec931f0af8cd9be6d3b5a00dd28a1bc7813d066c6 /lib/AST/Mangle.cpp
parenta17aaa79baf22409f9a2ae88da768af6592ea63a (diff)
downloadclang-d55e66916d72467ee6c1a2e169a4fbe0296b5400.tar.gz
AST - silence static analyzer getAs<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Mangle.cpp')
-rw-r--r--lib/AST/Mangle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/Mangle.cpp b/lib/AST/Mangle.cpp
index b158fe85a4..32d466cb57 100644
--- a/lib/AST/Mangle.cpp
+++ b/lib/AST/Mangle.cpp
@@ -386,7 +386,7 @@ public:
auto hasDefaultCXXMethodCC = [](ASTContext &C, const CXXMethodDecl *MD) {
auto DefaultCC = C.getDefaultCallingConvention(/*IsVariadic=*/false,
/*IsCXXMethod=*/true);
- auto CC = MD->getType()->getAs<FunctionProtoType>()->getCallConv();
+ auto CC = MD->getType()->castAs<FunctionProtoType>()->getCallConv();
return CC == DefaultCC;
};