[libc-commits] [libc] [libc] Fix non-calls to cpp::is_complex_type_same (PR #121257)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Sat Dec 28 02:33:39 PST 2024


https://github.com/frobtech updated https://github.com/llvm/llvm-project/pull/121257

>From c1fca702eb030a3024fcbf7098567b529ac1cc94 Mon Sep 17 00:00:00 2001
From: Roland McGrath <mcgrathr at google.com>
Date: Sat, 28 Dec 2024 01:07:35 -0800
Subject: [PATCH] [libc] Fix non-calls to cpp::is_complex_type_same

Some uses were not actually calls, just references to the name.
---
 libc/test/UnitTest/FPMatcher.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libc/test/UnitTest/FPMatcher.h b/libc/test/UnitTest/FPMatcher.h
index 9f2bae3279208b..b8e240bf328ce1 100644
--- a/libc/test/UnitTest/FPMatcher.h
+++ b/libc/test/UnitTest/FPMatcher.h
@@ -131,11 +131,11 @@ template <typename T, TestCond Condition> class CFPMatcher : public Matcher<T> {
     else if constexpr (cpp::is_complex_type_same<T, _Complex long double>())
       return matchComplex<long double>();
 #ifdef LIBC_TYPES_HAS_CFLOAT16
-    else if constexpr (cpp::is_complex_type_same<T, cfloat16>)
+    else if constexpr (cpp::is_complex_type_same<T, cfloat16>())
       return matchComplex<float16>();
 #endif
 #ifdef LIBC_TYPES_HAS_CFLOAT128
-    else if constexpr (cpp::is_complex_type_same<T, cfloat128>)
+    else if constexpr (cpp::is_complex_type_same<T, cfloat128>())
       return matchComplex<float128>();
 #endif
   }
@@ -148,11 +148,11 @@ template <typename T, TestCond Condition> class CFPMatcher : public Matcher<T> {
     else if constexpr (cpp::is_complex_type_same<T, _Complex long double>())
       return explainErrorComplex<long double>();
 #ifdef LIBC_TYPES_HAS_CFLOAT16
-    else if constexpr (cpp::is_complex_type_same<T, cfloat16>)
+    else if constexpr (cpp::is_complex_type_same<T, cfloat16>())
       return explainErrorComplex<float16>();
 #endif
 #ifdef LIBC_TYPES_HAS_CFLOAT128
-    else if constexpr (cpp::is_complex_type_same<T, cfloat128>)
+    else if constexpr (cpp::is_complex_type_same<T, cfloat128>())
       return explainErrorComplex<float128>();
 #endif
   }



More information about the libc-commits mailing list