瀏覽代碼

Remove an useless allocation (from by clang-analyzer/scan-build)
https://llvm.org/reports/scan-build/report-TargetInfo.cpp-detectFPCCEligibleStruct-9-1.html#EndPath



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374032 91177308-0d34-0410-b5e6-96231b3b80d8

Sylvestre Ledru 5 年之前
父節點
當前提交
2aa66afa82
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/CodeGen/TargetInfo.cpp

+ 1 - 1
lib/CodeGen/TargetInfo.cpp

@@ -9438,7 +9438,7 @@ bool RISCVABIInfo::detectFPCCEligibleStruct(QualType Ty, llvm::Type *&Field1Ty,
       Ty, CharUnits::Zero(), Field1Ty, Field1Off, Field2Ty, Field2Off);
       Ty, CharUnits::Zero(), Field1Ty, Field1Off, Field2Ty, Field2Off);
   // Not really a candidate if we have a single int but no float.
   // Not really a candidate if we have a single int but no float.
   if (Field1Ty && !Field2Ty && !Field1Ty->isFloatingPointTy())
   if (Field1Ty && !Field2Ty && !Field1Ty->isFloatingPointTy())
-    return IsCandidate = false;
+    return false;
   if (!IsCandidate)
   if (!IsCandidate)
     return false;
     return false;
   if (Field1Ty && Field1Ty->isFloatingPointTy())
   if (Field1Ty && Field1Ty->isFloatingPointTy())