[clang] cbbce9b - [Driver] Silence a -Wparentheses error. NFC
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 27 10:30:06 PDT 2022
Author: Craig Topper
Date: 2022-09-27T10:25:23-07:00
New Revision: cbbce9b537adfbc2271424ab66b3f2d818a2499f
URL: https://github.com/llvm/llvm-project/commit/cbbce9b537adfbc2271424ab66b3f2d818a2499f
DIFF: https://github.com/llvm/llvm-project/commit/cbbce9b537adfbc2271424ab66b3f2d818a2499f.diff
LOG: [Driver] Silence a -Wparentheses error. NFC
Added:
Modified:
clang/lib/Driver/Driver.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 73ee0b9585cf..a40a992ac087 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -635,7 +635,7 @@ static llvm::Triple computeTargetTriple(const Driver &D,
// If target is MIPS adjust the target triple
// accordingly to provided ABI name.
if (Target.isMIPS()) {
- if (A = Args.getLastArg(options::OPT_mabi_EQ)) {
+ if ((A = Args.getLastArg(options::OPT_mabi_EQ))) {
StringRef ABIName = A->getValue();
if (ABIName == "32") {
Target = Target.get32BitArchVariant();
@@ -659,7 +659,7 @@ static llvm::Triple computeTargetTriple(const Driver &D,
// If target is RISC-V adjust the target triple according to
// provided architecture name
if (Target.isRISCV()) {
- if (A = Args.getLastArg(options::OPT_march_EQ)) {
+ if ((A = Args.getLastArg(options::OPT_march_EQ))) {
StringRef ArchName = A->getValue();
if (ArchName.startswith_insensitive("rv32"))
Target.setArch(llvm::Triple::riscv32);
More information about the cfe-commits
mailing list