[libc-commits] [libc] [libc][complex] Add cargf and carg functions to libc complex math (PR #204087)

Victor Campos via libc-commits libc-commits at lists.llvm.org
Mon Jun 22 06:05:38 PDT 2026


================
@@ -0,0 +1,102 @@
+//===-- Utility class to test different flavors of carg ---------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TEST_SRC_COMPLEX_CARGTEST_H
+#define LLVM_LIBC_TEST_SRC_COMPLEX_CARGTEST_H
+
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+#include "hdr/math_macros.h"
+
+template <typename CFPT, typename FPT>
+class CArgTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
+
+  DECLARE_SPECIAL_CONSTANTS(FPT)
+
+public:
+  typedef FPT (*CArgFunc)(CFPT);
----------------
vhscampos wrote:

Please use C++ style type alias, `using CArgFunc = FPT (*)(CFPT);`

https://github.com/llvm/llvm-project/pull/204087


More information about the libc-commits mailing list