[clang] 618543b - [clang][NFC] Fix a -Wparentheses warning.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 7 08:56:40 PDT 2021
Author: Craig Topper
Date: 2021-08-07T08:56:31-07:00
New Revision: 618543bb120b5c92e692a4b22deb59012e047c9d
URL: https://github.com/llvm/llvm-project/commit/618543bb120b5c92e692a4b22deb59012e047c9d
DIFF: https://github.com/llvm/llvm-project/commit/618543bb120b5c92e692a4b22deb59012e047c9d.diff
LOG: [clang][NFC] Fix a -Wparentheses warning.
Added:
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 96bbc0250126..956b31e18ef8 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -4747,7 +4747,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (StringRef(A->getValue()).getAsInteger(10, Value) || Value > 65536)
TC.getDriver().Diag(diag::err_drv_invalid_int_value)
<< A->getAsString(Args) << A->getValue();
- else if (Value & Value - 1)
+ else if (Value & (Value - 1))
TC.getDriver().Diag(diag::err_drv_alignment_not_power_of_two)
<< A->getAsString(Args) << A->getValue();
// Treat =0 as unspecified (use the target preference).
More information about the cfe-commits
mailing list