Skip to content

Commit 6209533

Browse files
authored
[libc] Fix warning in libc/utils/MPCWrapper/MPCUtils.h (llvm#129349)
`cpp::is_complex_type_same<T1, T2>` is a function, so we need parentheses in order to call it. Otherwise the expression is treated like a function pointer which is always true in this boolean context.
1 parent 84b365c commit 6209533

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/utils/MPCWrapper/MPCUtils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ template <Operation op, typename InputType, typename OutputType>
174174
constexpr bool is_valid_operation() {
175175
return (Operation::BeginBinaryOperationsSingleOutput < op &&
176176
op < Operation::EndBinaryOperationsSingleOutput &&
177-
cpp::is_complex_type_same<InputType, OutputType> &&
177+
cpp::is_complex_type_same<InputType, OutputType>() &&
178178
cpp::is_complex_v<InputType>) ||
179179
(Operation::BeginUnaryOperationsSingleOutputSameOutputType < op &&
180180
op < Operation::EndUnaryOperationsSingleOutputSameOutputType &&
181-
cpp::is_complex_type_same<InputType, OutputType> &&
181+
cpp::is_complex_type_same<InputType, OutputType>() &&
182182
cpp::is_complex_v<InputType>) ||
183183
(Operation::BeginUnaryOperationsSingleOutputDifferentOutputType < op &&
184184
op < Operation::EndUnaryOperationsSingleOutputDifferentOutputType &&

0 commit comments

Comments
 (0)