diff options
author | Mike Rice <michael.p.rice@intel.com> | 2023-11-17 09:22:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 09:22:33 -0800 |
commit | 3ce5c04ad0585e5e14ba9d2f594492a257edf7b1 (patch) | |
tree | 7344de435953a8d1bf02711908ca101403f5974b /clang | |
parent | 6e31709283478aec409af924d9e9c13843f13c42 (diff) | |
download | llvm-3ce5c04ad0585e5e14ba9d2f594492a257edf7b1.zip llvm-3ce5c04ad0585e5e14ba9d2f594492a257edf7b1.tar.gz llvm-3ce5c04ad0585e5e14ba9d2f594492a257edf7b1.tar.bz2 |
Replace getAs with castAs, dyn_cast with cast (NFC) (#72600)
Make the code clear that nullptrs are not expected.
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 4f54791..1c893d0 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4014,8 +4014,8 @@ QualType ASTContext::getVectorType(QualType vecType, unsigned NumElts, assert(vecType->isBuiltinType() || (vecType->isBitIntType() && // Only support _BitInt elements with byte-sized power of 2 NumBits. - llvm::isPowerOf2_32(vecType->getAs<BitIntType>()->getNumBits()) && - vecType->getAs<BitIntType>()->getNumBits() >= 8)); + llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) && + vecType->castAs<BitIntType>()->getNumBits() >= 8)); // Check if we've already instantiated a vector of this type. llvm::FoldingSetNodeID ID; |