[clang] [clang][bytecode][NFC] Use const auto* for Type cast result (PR #114405)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 31 06:55:11 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/114405.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Program.cpp (+2-2)
``````````diff
diff --git a/clang/lib/AST/ByteCode/Program.cpp b/clang/lib/AST/ByteCode/Program.cpp
index 0da518ec92afae..04e0b1884e3d6b 100644
--- a/clang/lib/AST/ByteCode/Program.cpp
+++ b/clang/lib/AST/ByteCode/Program.cpp
@@ -399,10 +399,10 @@ Descriptor *Program::createDescriptor(const DeclTy &D, const Type *Ty,
}
// Arrays.
- if (const auto ArrayType = Ty->getAsArrayTypeUnsafe()) {
+ if (const auto *ArrayType = Ty->getAsArrayTypeUnsafe()) {
QualType ElemTy = ArrayType->getElementType();
// Array of well-known bounds.
- if (auto CAT = dyn_cast<ConstantArrayType>(ArrayType)) {
+ if (const auto *CAT = dyn_cast<ConstantArrayType>(ArrayType)) {
size_t NumElems = CAT->getZExtSize();
if (std::optional<PrimType> T = Ctx.classify(ElemTy)) {
// Arrays of primitives.
``````````
</details>
https://github.com/llvm/llvm-project/pull/114405
More information about the cfe-commits
mailing list