From fa343be414f9364911b947f109f3df5539e23068 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 15 Aug 2024 15:56:33 +0900 Subject: [PATCH] Fix warnings in #102848 [-Wunused-but-set-variable] --- clang/lib/AST/MicrosoftMangle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index a113574675b4c5..db8000e25dc7cc 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -2969,6 +2969,7 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, if (const auto *AT = ResultType->getContainedAutoType()) { assert(AT->getKeyword() == AutoTypeKeyword::Auto && "should only need to mangle auto!"); + (void)AT; Out << '?'; mangleQualifiers(ResultType.getLocalQualifiers(), /*IsMember=*/false); Out << '?'; @@ -2987,7 +2988,7 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, // SourceRange Range)` for details. auto UseClangMangling = [](QualType ResultType) { QualType T = ResultType; - while (const auto *PT = dyn_cast(T.getTypePtr())) { + while (isa(T.getTypePtr())) { T = T->getPointeeType(); if (T.getQualifiers().hasAddressSpace()) return true;