aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-04-09 15:49:33 +0200
committerDmitry Vyukov <dvyukov@google.com>2025-04-10 17:07:48 +0000
commit19eaed83ec269d117586013015f9eb856d04162d (patch)
tree6eda4dd8f117932b5d248fabdc9bdae04c506f09
parentd77f428f8d1a224f7aa8085a5ce10083267b0ae6 (diff)
tools/syz-declextract: fix warnings about unused variables
-rw-r--r--tools/syz-declextract/clangtool/declextract.cpp4
1 files changed, 2 insertions, 2 deletions
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<BuiltinType>(T)) {
+ if (llvm::isa<BuiltinType>(T)) {
return IntType{.ByteSize = sizeofType(T), .Name = TypeName(QT), .Base = QualType(T, 0).getAsString()};
}
if (auto* Typ = llvm::dyn_cast<EnumType>(T)) {
return IntType{.ByteSize = sizeofType(T), .Enum = extractEnum(Typ->getDecl())};
}
- if (auto* Typ = llvm::dyn_cast<FunctionProtoType>(T)) {
+ if (llvm::isa<FunctionProtoType>(T)) {
return PtrType{.Elem = TodoType(), .IsConst = true};
}
if (auto* Typ = llvm::dyn_cast<IncompleteArrayType>(T)) {