[clang] [NFC][Clang] Clean up VisitUnaryPlus by removing unused FP feature check (PR #101412)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 14:08:40 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-codegen
Author: None (smanna12)
<details>
<summary>Changes</summary>
This commit removes an unnecessary call to `E->hasStoredFPFeatures()` within the `VisitUnaryPlus` function. The method's return value was not being used, leading to a redundant operation. The removal of this line streamlines the function and eliminates an unneeded check for stored floating-point features.
---
Full diff: https://github.com/llvm/llvm-project/pull/101412.diff
1 Files Affected:
- (modified) clang/lib/CodeGen/CGExprComplex.cpp (-1)
``````````diff
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp
index 4d45f6d64c1cd..828a09856099a 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/lib/CodeGen/CGExprComplex.cpp
@@ -649,7 +649,6 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastKind CK, Expr *Op,
ComplexPairTy ComplexExprEmitter::VisitUnaryPlus(const UnaryOperator *E,
QualType PromotionType) {
- E->hasStoredFPFeatures();
QualType promotionTy =
PromotionType.isNull()
? getPromotionType(E->getStoredFPFeaturesOrDefault(),
``````````
</details>
https://github.com/llvm/llvm-project/pull/101412
More information about the cfe-commits
mailing list