diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-07 16:42:25 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-07 16:42:25 +0000 |
commit | 7e38f0c408058ec104df4f92b9d0789ab07f21e8 (patch) | |
tree | 103440c5fc2a42b40e14ef67de59a70181e66f49 /clang/lib/CodeGen/TargetInfo.cpp | |
parent | b3342e180e9c2cc59580796d3c4b88a1b7d65434 (diff) | |
download | llvm-7e38f0c408058ec104df4f92b9d0789ab07f21e8.zip llvm-7e38f0c408058ec104df4f92b9d0789ab07f21e8.tar.gz llvm-7e38f0c408058ec104df4f92b9d0789ab07f21e8.tar.bz2 |
Codegen - 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: 373918
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 497f3f7..b281db3 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -9532,7 +9532,7 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed, // Complex types for the hard float ABI must be passed direct rather than // using CoerceAndExpand. if (IsFixed && Ty->isComplexType() && FLen && ArgFPRsLeft >= 2) { - QualType EltTy = Ty->getAs<ComplexType>()->getElementType(); + QualType EltTy = Ty->castAs<ComplexType>()->getElementType(); if (getContext().getTypeSize(EltTy) <= FLen) { ArgFPRsLeft -= 2; return ABIArgInfo::getDirect(); |