[clang] 63dab72 - [Sema] Remove unused variable 'FromExtType' [NFC]

Mikael Holmen via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 02:26:13 PDT 2024


Author: Mikael Holmen
Date: 2024-09-12T11:23:13+02:00
New Revision: 63dab72fd5b96cd98bba6d041d08bb2a6f3aaa0a

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

LOG: [Sema] Remove unused variable 'FromExtType' [NFC]

Last use of the variable was removed in a29afb754fb4
 [HLSL] Allow truncation to scalar (#104844)

gcc warned about this:
  ../../clang/lib/Sema/SemaOverload.cpp:2070:15: warning: unused variable 'FromExtType' [-Wunused-variable]
  2070 |     if (auto *FromExtType = FromType->getAs<ExtVectorType>()) {
       |               ^~~~~~~~~~~

Added: 
    

Modified: 
    clang/lib/Sema/SemaOverload.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index ea72d3f003cbc4..a155bb2fd3ba2a 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -2067,7 +2067,7 @@ static bool IsVectorConversion(Sema &S, QualType FromType, QualType ToType,
 
   // There are no conversions between extended vector types, only identity.
   if (auto *ToExtType = ToType->getAs<ExtVectorType>()) {
-    if (auto *FromExtType = FromType->getAs<ExtVectorType>()) {
+    if (FromType->getAs<ExtVectorType>()) {
       // There are no conversions between extended vector types other than the
       // identity conversion.
       return false;


        


More information about the cfe-commits mailing list