projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61fc02d
)
[Support] AbsoluteDifference - add brackets to appease static analyzer warning. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 17 Apr 2021 11:00:38 +0000
(12:00 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 17 Apr 2021 12:47:02 +0000
(13:47 +0100)
llvm/include/llvm/Support/MathExtras.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/Support/MathExtras.h
b/llvm/include/llvm/Support/MathExtras.h
index
10d4260
..
753b199
100644
(file)
--- a/
llvm/include/llvm/Support/MathExtras.h
+++ b/
llvm/include/llvm/Support/MathExtras.h
@@
-792,7
+792,7
@@
inline int64_t SignExtend64(uint64_t X, unsigned B) {
/// value of the result.
template <typename T>
std::enable_if_t<std::is_unsigned<T>::value, T> AbsoluteDifference(T X, T Y) {
- return X > Y ?
X - Y : Y - X
;
+ return X > Y ?
(X - Y) : (Y - X)
;
}
/// Add two unsigned integers, X and Y, of type T. Clamp the result to the