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.
llvm-svn: 373904
diff --git a/clang/lib/AST/Mangle.cpp b/clang/lib/AST/Mangle.cpp
index b158fe8..32d466c 100644
--- a/clang/lib/AST/Mangle.cpp
+++ b/clang/lib/AST/Mangle.cpp
@@ -386,7 +386,7 @@
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;
};