From 19eaed83ec269d117586013015f9eb856d04162d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 9 Apr 2025 15:49:33 +0200 Subject: tools/syz-declextract: fix warnings about unused variables --- tools/syz-declextract/clangtool/declextract.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/syz-declextract/clangtool/declextract.cpp b/tools/syz-declextract/clangtool/declextract.cpp index aa12f8099..786f66ca5 100644 --- a/tools/syz-declextract/clangtool/declextract.cpp +++ b/tools/syz-declextract/clangtool/declextract.cpp @@ -206,13 +206,13 @@ std::string TypeName(QualType QT) { // Top function that converts any clang type QT to our output type. FieldType Extractor::genType(QualType QT, const std::string& BackupName) { const Type* T = QT.IgnoreParens().getUnqualifiedType().getDesugaredType(*Context).getTypePtr(); - if (auto* Typ = llvm::dyn_cast(T)) { + if (llvm::isa(T)) { return IntType{.ByteSize = sizeofType(T), .Name = TypeName(QT), .Base = QualType(T, 0).getAsString()}; } if (auto* Typ = llvm::dyn_cast(T)) { return IntType{.ByteSize = sizeofType(T), .Enum = extractEnum(Typ->getDecl())}; } - if (auto* Typ = llvm::dyn_cast(T)) { + if (llvm::isa(T)) { return PtrType{.Elem = TodoType(), .IsConst = true}; } if (auto* Typ = llvm::dyn_cast(T)) { -- cgit mrf-deployment