Author: NAKAMURA Takumi
Date: 2024-08-15T16:12:05+09:00
New Revision: fa343be414f9364911b947f109f3df5539e23068

URL: 
https://github.com/llvm/llvm-project/commit/fa343be414f9364911b947f109f3df5539e23068
DIFF: 
https://github.com/llvm/llvm-project/commit/fa343be414f9364911b947f109f3df5539e23068.diff

LOG: Fix warnings in #102848 [-Wunused-but-set-variable]

Added: 
    

Modified: 
    clang/lib/AST/MicrosoftMangle.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/MicrosoftMangle.cpp 
b/clang/lib/AST/MicrosoftMangle.cpp
index a113574675b4c..db8000e25dc7c 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<PointerType>(T.getTypePtr())) {
+        while (isa<PointerType>(T.getTypePtr())) {
           T = T->getPointeeType();
           if (T.getQualifiers().hasAddressSpace())
             return true;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to