[clang] [Flang] responds to Clang Tidy feedback (PR #87847)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 5 17:15:18 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Christopher Di Bella (cjdb)
<details>
<summary>Changes</summary>
Line 267: performance-unnecessary-copy-initialization
Line 592: readability-container-size-empty
---
Full diff: https://github.com/llvm/llvm-project/pull/87847.diff
1 Files Affected:
- (modified) clang/lib/Driver/ToolChains/Flang.cpp (+2-2)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp
index 2c83f70eb7887e..45d86c2f9b0ad4 100644
--- a/clang/lib/Driver/ToolChains/Flang.cpp
+++ b/clang/lib/Driver/ToolChains/Flang.cpp
@@ -264,7 +264,7 @@ static void addVSDefines(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back(Args.MakeArgString("-D_MSC_FULL_VER=" + Twine(ver)));
CmdArgs.push_back(Args.MakeArgString("-D_WIN32"));
- llvm::Triple triple = TC.getTriple();
+ const llvm::Triple& triple = TC.getTriple();
if (triple.isAArch64()) {
CmdArgs.push_back("-D_M_ARM64=1");
} else if (triple.isX86() && triple.isArch32Bit()) {
@@ -589,7 +589,7 @@ static void addFloatingPointOptions(const Driver &D, const ArgList &Args,
if (!HonorINFs && !HonorNaNs && AssociativeMath && ReciprocalMath &&
ApproxFunc && !SignedZeros &&
- (FPContract == "fast" || FPContract == "")) {
+ (FPContract == "fast" || FPContract.empty())) {
CmdArgs.push_back("-ffast-math");
return;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/87847
More information about the cfe-commits
mailing list