aboutsummaryrefslogtreecommitdiff
path: root/llvm/include
diff options
context:
space:
mode:
authorAmaury Séchet <deadalnix@gmail.com>2022-07-24 22:02:59 +0000
committerAmaury Séchet <deadalnix@gmail.com>2022-07-24 22:04:09 +0000
commit5e29360743ca822f6934877cc972295c2da5a38b (patch)
tree1edf0897729a902e553aba3d0bf70b9c63480b6c /llvm/include
parent9e88cbcc403bdf82f29259ad60ff60a8fc4434a1 (diff)
downloadllvm-5e29360743ca822f6934877cc972295c2da5a38b.zip
llvm-5e29360743ca822f6934877cc972295c2da5a38b.tar.gz
llvm-5e29360743ca822f6934877cc972295c2da5a38b.tar.bz2
[NFC] Add parentheses in MathExtra.h
The code used to cause a warning: llvm/include/llvm/Support/MathExtras.h:751:39: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] 751 | assert(Align != 0 && (Align & Align - 1) == 0 && |
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/MathExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index 372dbaf..94ecae9 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -748,7 +748,7 @@ inline uint64_t alignTo(uint64_t Value, uint64_t Align) {
}
inline uint64_t alignToPowerOf2(uint64_t Value, uint64_t Align) {
- assert(Align != 0 && (Align & Align - 1) == 0 &&
+ assert(Align != 0 && (Align & (Align - 1)) == 0 &&
"Align must be a power of 2");
return (Value + Align - 1) & -Align;
}