[clang] [Clang][C++26] Implement "Ordering of constraints involving fold expressions (PR #98160)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 01:51:55 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 4 "build".

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

Here is the relevant piece of the build log for the reference:
```
Step 4 (build) failure: build (failure)
...
33.973 [2544/30/3650] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCGNU.cpp.o
33.975 [2544/29/3651] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGOpenMPRuntimeGPU.cpp.o
33.977 [2544/28/3652] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGOpenCLRuntime.cpp.o
33.985 [2544/27/3653] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGOpenMPRuntime.cpp.o
34.049 [2544/26/3654] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/CommentSema.cpp.o
34.085 [2544/25/3655] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Version.cpp.o
34.131 [2544/24/3656] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/Expr.cpp.o
34.287 [2544/23/3657] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
34.343 [2544/22/3658] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/BackendUtil.cpp.o
37.510 [2544/21/3659] Building CXX object tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseDecl.cpp.o
FAILED: tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseDecl.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/clang/lib/Parse -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/clang/lib/Parse -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/clang/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/clang/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseDecl.cpp.o -MF tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseDecl.cpp.o.d -o tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseDecl.cpp.o -c /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/clang/lib/Parse/ParseDecl.cpp
In file included from ../llvm-project/clang/lib/Parse/ParseDecl.cpp:13:
In file included from ../llvm-project/clang/include/clang/AST/ASTContext.h:18:
In file included from ../llvm-project/clang/include/clang/AST/CanonicalType.h:17:
In file included from ../llvm-project/clang/include/clang/AST/Type.h:21:
In file included from ../llvm-project/clang/include/clang/AST/NestedNameSpecifier.h:18:
In file included from ../llvm-project/clang/include/clang/Basic/Diagnostic.h:19:
In file included from ../llvm-project/clang/include/clang/Basic/SourceLocation.h:17:
In file included from ../llvm-project/clang/include/clang/Basic/FileEntry.h:22:
In file included from ../llvm-project/llvm/include/llvm/ADT/PointerUnion.h:19:
../llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:172:17: error: static assertion failed due to requirement '2U <= PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind, llvm::PointerLikeTypeTraits<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *>, llvm::PointerIntPairInfo<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, llvm::PointerLikeTypeTraits<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *>>>>::NumLowBitsAvailable': PointerIntPair with integer size too large for pointer
  172 |   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:111:13: note: in instantiation of template class 'llvm::PointerIntPairInfo<void *, 2, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>' requested here
  111 |     Value = Info::updateInt(Info::updatePointer(0, PtrVal),
      |             ^
../llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:89:5: note: in instantiation of member function 'llvm::PointerIntPair<void *, 2, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>::setPointerAndInt' requested here
   89 |     setPointerAndInt(PtrVal, IntVal);
      |     ^
../llvm-project/llvm/include/llvm/ADT/PointerUnion.h:77:16: note: in instantiation of member function 'llvm::PointerIntPair<void *, 2, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>::PointerIntPair' requested here
   77 |         : Base(ValTy(const_cast<void *>(
      |                ^
../llvm-project/clang/include/clang/Sema/SemaConcept.h:114:46: note: in instantiation of member function 'llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>, llvm::PointerIntPair<void *, 2, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>, 0, clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>::PointerUnionMembers' requested here
  114 |   NormalizedConstraint(AtomicConstraint *C): Constraint{C} { };
      |                                              ^
../llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:172:25: note: expression evaluates to '2 <= 1'
  172 |   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:111:17: error: incomplete definition of type 'llvm::PointerIntPairInfo<void *, 2, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>'
  111 |     Value = Info::updateInt(Info::updatePointer(0, PtrVal),
      |             ~~~~^~
../llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:89:5: note: in instantiation of member function 'llvm::PointerIntPair<void *, 2, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>::setPointerAndInt' requested here
   89 |     setPointerAndInt(PtrVal, IntVal);
      |     ^
../llvm-project/llvm/include/llvm/ADT/PointerUnion.h:77:16: note: in instantiation of member function 'llvm::PointerIntPair<void *, 2, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>::PointerIntPair' requested here
   77 |         : Base(ValTy(const_cast<void *>(
      |                ^
../llvm-project/clang/include/clang/Sema/SemaConcept.h:114:46: note: in instantiation of member function 'llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>, llvm::PointerIntPair<void *, 2, int, llvm::pointer_union_detail::PointerUnionUIntTraits<clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>>, 0, clang::AtomicConstraint *, clang::FoldExpandedConstraint *, llvm::PointerIntPair<std::pair<clang::NormalizedConstraint, clang::NormalizedConstraint> *, 1, clang::NormalizedConstraint::CompoundConstraintKind>>::PointerUnionMembers' requested here

```

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


More information about the cfe-commits mailing list