[libc-commits] [libc] [libc][complex] Set up headers and add documentation for complex.h. (PR #111659)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Mon Oct 14 10:40:01 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-gcc-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/8368

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[1662/5013] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.shm_open.__internal__.dir/shm_open.cpp.o
[1663/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hdestroy_r.__internal__.dir/hdestroy_r.cpp.o
[1664/5013] Building CXX object projects/libc/test/UnitTest/CMakeFiles/LibcDeathTestExecutors.unit.dir/ExecuteFunctionUnix.cpp.o
[1665/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hdestroy.__internal__.dir/hdestroy.cpp.o
[1666/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hcreate.__internal__.dir/hcreate.cpp.o
[1667/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hsearch.__internal__.dir/hsearch.cpp.o
[1668/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hsearch_r.__internal__.dir/hsearch_r.cpp.o
[1669/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hcreate_r.__internal__.dir/hcreate_r.cpp.o
[1670/5013] Building CXX object projects/libc/test/UnitTest/CMakeFiles/LibcTest.unit.dir/LibcTestMain.cpp.o
[1671/5013] Building CXX object projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o
FAILED: projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wno-c99-extensions -std=c++17 -MD -MT projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o -MF projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o.d -o projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/Test.h:37,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:20,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp: In member function ‘virtual void LlvmLibcComplexTest_IMacro::Run()’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:51: error: unable to find numeric literal operator ‘operator""fi’
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                                   ^~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
  406 |   if (TEST)                                                                    \
      |       ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:492:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
  492 |   LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
      |   ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:214:3: note: in expansion of macro ‘EXPECT_THAT’
  214 |   EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex<              \
      |   ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:37: note: in expansion of macro ‘EXPECT_CFP_EQ’
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                     ^~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:51: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                                   ^~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
  406 |   if (TEST)                                                                    \
      |       ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:492:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
  492 |   LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
      |   ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:214:3: note: in expansion of macro ‘EXPECT_THAT’
  214 |   EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex<              \
      |   ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:37: note: in expansion of macro ‘EXPECT_CFP_EQ’
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                     ^~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-macros/complex-macros.h:17:37: error: unable to find numeric literal operator ‘operator""fi’
   17 | #define _Complex_I ((_Complex float)1.0fi)
      |                                     ^~~~~
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[1662/5013] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.shm_open.__internal__.dir/shm_open.cpp.o
[1663/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hdestroy_r.__internal__.dir/hdestroy_r.cpp.o
[1664/5013] Building CXX object projects/libc/test/UnitTest/CMakeFiles/LibcDeathTestExecutors.unit.dir/ExecuteFunctionUnix.cpp.o
[1665/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hdestroy.__internal__.dir/hdestroy.cpp.o
[1666/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hcreate.__internal__.dir/hcreate.cpp.o
[1667/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hsearch.__internal__.dir/hsearch.cpp.o
[1668/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hsearch_r.__internal__.dir/hsearch_r.cpp.o
[1669/5013] Building CXX object projects/libc/src/search/CMakeFiles/libc.src.search.hcreate_r.__internal__.dir/hcreate_r.cpp.o
[1670/5013] Building CXX object projects/libc/test/UnitTest/CMakeFiles/LibcTest.unit.dir/LibcTestMain.cpp.o
[1671/5013] Building CXX object projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o
FAILED: projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wno-c99-extensions -std=c++17 -MD -MT projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o -MF projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o.d -o projects/libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/Test.h:37,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:20,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp: In member function ‘virtual void LlvmLibcComplexTest_IMacro::Run()’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:51: error: unable to find numeric literal operator ‘operator""fi’
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                                   ^~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
  406 |   if (TEST)                                                                    \
      |       ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:492:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
  492 |   LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
      |   ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:214:3: note: in expansion of macro ‘EXPECT_THAT’
  214 |   EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex<              \
      |   ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:37: note: in expansion of macro ‘EXPECT_CFP_EQ’
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                     ^~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:51: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                                   ^~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
  406 |   if (TEST)                                                                    \
      |       ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:492:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
  492 |   LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
      |   ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:214:3: note: in expansion of macro ‘EXPECT_THAT’
  214 |   EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex<              \
      |   ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:17:37: note: in expansion of macro ‘EXPECT_CFP_EQ’
   17 | TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
      |                                     ^~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-macros/complex-macros.h:17:37: error: unable to find numeric literal operator ‘operator""fi’
   17 | #define _Complex_I ((_Complex float)1.0fi)
      |                                     ^~~~~

```

</details>

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


More information about the libc-commits mailing list