Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) #77768

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

MitalAshok
Copy link
Contributor

Closes #77638, #24186

Rebased from https://reviews.llvm.org/D156032, see there for more information.

Implements wording change in CWG2137 in the first commit.

This also implements an approach to CWG2311 in the second commit, because too much code that relies on T{ T_prvalue } being an elision would break. Because that issue is still open and the CWG issue doesn't provide wording to fix the issue, there may be different behaviours on other compilers.

@MitalAshok MitalAshok requested review from Endilll and a team as code owners January 11, 2024 13:35
@llvmbot llvmbot added clang Clang issues not falling into any other category libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jan 11, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 11, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-libcxx

Author: Mital Ashok (MitalAshok)

Changes

Closes #77638, #24186

Rebased from <https://reviews.llvm.org/D156032>, see there for more information.

Implements wording change in CWG2137 in the first commit.

This also implements an approach to CWG2311 in the second commit, because too much code that relies on T{ T_prvalue } being an elision would break. Because that issue is still open and the CWG issue doesn't provide wording to fix the issue, there may be different behaviours on other compilers.


Full diff: https://github.com/llvm/llvm-project/pull/77768.diff

8 Files Affected:

  • (modified) clang/docs/ReleaseNotes.rst (+5)
  • (modified) clang/lib/Sema/SemaInit.cpp (+30-10)
  • (modified) clang/lib/Sema/SemaOverload.cpp (+28-10)
  • (modified) clang/test/CXX/drs/dr14xx.cpp (-10)
  • (modified) clang/test/CXX/drs/dr21xx.cpp (+40)
  • (modified) clang/test/CXX/drs/dr23xx.cpp (+84)
  • (modified) clang/www/cxx_dr_status.html (+2-2)
  • (modified) libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_U_V_move.pass.cpp (+20-1)
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 59732962caac65..66d388bb954bda 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -199,6 +199,11 @@ C++2c Feature Support
 
 Resolutions to C++ Defect Reports
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+- Implemented `CWG2137 <https://wg21.link/CWG2137>`_ which allows
+  list-initialization from objects of the same type.
+- Implemented `CWG2311 <https://wg21.link/CWG2311>`_: given a prvalue ``e`` of object type
+  ``T``, ``T{e}`` will try to resolve an initializer list constructor and will use it if successful (CWG2137).
+  Otherwise, if there is no initializer list constructor, the copy will be elided as if it was ``T(e)``.
 
 C Language Changes
 ------------------
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 408ee5f775804b..2822a8d5d78b3e 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -4199,7 +4199,7 @@ static OverloadingResult ResolveConstructorOverload(
 /// \param IsListInit     Is this list-initialization?
 /// \param IsInitListCopy Is this non-list-initialization resulting from a
 ///                       list-initialization from {x} where x is the same
-///                       type as the entity?
+///                       aggregate type as the entity?
 static void TryConstructorInitialization(Sema &S,
                                          const InitializedEntity &Entity,
                                          const InitializationKind &Kind,
@@ -4229,6 +4229,14 @@ static void TryConstructorInitialization(Sema &S,
         Entity.getKind() !=
             InitializedEntity::EK_LambdaToBlockConversionBlockElement);
 
+  bool CopyElisionPossible = false;
+  auto ElideConstructor = [&] {
+    // Convert qualifications if necessary.
+    Sequence.AddQualificationConversionStep(DestType, VK_PRValue);
+    if (ILE)
+      Sequence.RewrapReferenceInitList(DestType, ILE);
+  };
+
   // C++17 [dcl.init]p17:
   //     - If the initializer expression is a prvalue and the cv-unqualified
   //       version of the source type is the same class as the class of the
@@ -4241,11 +4249,17 @@ static void TryConstructorInitialization(Sema &S,
   if (S.getLangOpts().CPlusPlus17 && !RequireActualConstructor &&
       UnwrappedArgs.size() == 1 && UnwrappedArgs[0]->isPRValue() &&
       S.Context.hasSameUnqualifiedType(UnwrappedArgs[0]->getType(), DestType)) {
-    // Convert qualifications if necessary.
-    Sequence.AddQualificationConversionStep(DestType, VK_PRValue);
-    if (ILE)
-      Sequence.RewrapReferenceInitList(DestType, ILE);
-    return;
+    if (ILE && !DestType->isAggregateType()) {
+      // CWG2311: T{ prvalue_of_type_T } is not eligible for copy elision
+      // Make this an elision if this won't call an initializer-list
+      // constructor. (Always on an aggregate type or check constructors first.)
+      assert(!IsInitListCopy &&
+             "IsInitListCopy only possible with aggregate types");
+      CopyElisionPossible = true;
+    } else {
+      ElideConstructor();
+      return;
+    }
   }
 
   const RecordType *DestRecordType = DestType->getAs<RecordType>();
@@ -4290,6 +4304,12 @@ static void TryConstructorInitialization(Sema &S,
           S, Kind.getLocation(), Args, CandidateSet, DestType, Ctors, Best,
           CopyInitialization, AllowExplicit,
           /*OnlyListConstructors=*/true, IsListInit, RequireActualConstructor);
+
+    if (CopyElisionPossible && Result == OR_No_Viable_Function) {
+      // No initializer list candidate
+      ElideConstructor();
+      return;
+    }
   }
 
   // C++11 [over.match.list]p1:
@@ -4571,9 +4591,9 @@ static void TryListInitialization(Sema &S,
     return;
   }
 
-  // C++11 [dcl.init.list]p3, per DR1467:
-  // - If T is a class type and the initializer list has a single element of
-  //   type cv U, where U is T or a class derived from T, the object is
+  // C++11 [dcl.init.list]p3, per DR1467 and DR2137:
+  // - If T is an aggregate class and the initializer list has a single element
+  //   of type cv U, where U is T or a class derived from T, the object is
   //   initialized from that element (by copy-initialization for
   //   copy-list-initialization, or by direct-initialization for
   //   direct-list-initialization).
@@ -4584,7 +4604,7 @@ static void TryListInitialization(Sema &S,
   // - Otherwise, if T is an aggregate, [...] (continue below).
   if (S.getLangOpts().CPlusPlus11 && InitList->getNumInits() == 1 &&
       !IsDesignatedInit) {
-    if (DestType->isRecordType()) {
+    if (DestType->isRecordType() && DestType->isAggregateType()) {
       QualType InitType = InitList->getInit(0)->getType();
       if (S.Context.hasSameUnqualifiedType(InitType, DestType) ||
           S.IsDerivedFrom(InitList->getBeginLoc(), InitType, DestType)) {
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 64bc3851980272..30bc2036cf781c 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -1562,19 +1562,37 @@ TryUserDefinedConversion(Sema &S, Expr *From, QualType ToType,
     //   called for those cases.
     if (CXXConstructorDecl *Constructor
           = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
-      QualType FromCanon
-        = S.Context.getCanonicalType(From->getType().getUnqualifiedType());
+      QualType FromType;
+      SourceLocation FromLoc;
+      // C++11 [over.ics.list]p6, per DR2137:
+      // C++17 [over.ics.list]p6:
+      //   If C is not an initializer-list constructor and the initializer list
+      //   has a single element of type cv U, where U is X or a class derived
+      //   from X, the implicit conversion sequence has Exact Match rank if U is
+      //   X, or Conversion rank if U is derived from X.
+      if (const auto *InitList = dyn_cast<InitListExpr>(From);
+          InitList && InitList->getNumInits() == 1 &&
+          !S.isInitListConstructor(Constructor)) {
+        const Expr *SingleInit = InitList->getInit(0);
+        FromType = SingleInit->getType();
+        FromLoc = SingleInit->getBeginLoc();
+      } else {
+        FromType = From->getType();
+        FromLoc = From->getBeginLoc();
+      }
+      QualType FromCanon =
+          S.Context.getCanonicalType(FromType.getUnqualifiedType());
       QualType ToCanon
         = S.Context.getCanonicalType(ToType).getUnqualifiedType();
       if (Constructor->isCopyConstructor() &&
           (FromCanon == ToCanon ||
-           S.IsDerivedFrom(From->getBeginLoc(), FromCanon, ToCanon))) {
+           S.IsDerivedFrom(FromLoc, FromCanon, ToCanon))) {
         // Turn this into a "standard" conversion sequence, so that it
         // gets ranked with standard conversion sequences.
         DeclAccessPair Found = ICS.UserDefined.FoundConversionFunction;
         ICS.setStandard();
         ICS.Standard.setAsIdentityConversion();
-        ICS.Standard.setFromType(From->getType());
+        ICS.Standard.setFromType(FromType);
         ICS.Standard.setAllToTypes(ToType);
         ICS.Standard.CopyConstructor = Constructor;
         ICS.Standard.FoundCopyConstructor = Found;
@@ -5320,18 +5338,18 @@ TryListConversion(Sema &S, InitListExpr *From, QualType ToType,
       IsDesignatedInit)
     return Result;
 
-  // Per DR1467:
-  //   If the parameter type is a class X and the initializer list has a single
-  //   element of type cv U, where U is X or a class derived from X, the
-  //   implicit conversion sequence is the one required to convert the element
-  //   to the parameter type.
+  // Per DR1467 and DR2137:
+  //   If the parameter type is an aggregate class X and the initializer list
+  //   has a single element of type cv U, where U is X or a class derived from
+  //   X, the implicit conversion sequence is the one required to convert the
+  //   element to the parameter type.
   //
   //   Otherwise, if the parameter type is a character array [... ]
   //   and the initializer list has a single element that is an
   //   appropriately-typed string literal (8.5.2 [dcl.init.string]), the
   //   implicit conversion sequence is the identity conversion.
   if (From->getNumInits() == 1 && !IsDesignatedInit) {
-    if (ToType->isRecordType()) {
+    if (ToType->isRecordType() && ToType->isAggregateType()) {
       QualType InitType = From->getInit(0)->getType();
       if (S.Context.hasSameUnqualifiedType(InitType, ToType) ||
           S.IsDerivedFrom(From->getBeginLoc(), InitType, ToType))
diff --git a/clang/test/CXX/drs/dr14xx.cpp b/clang/test/CXX/drs/dr14xx.cpp
index d262f6f9dcab79..4c29d03a6e117a 100644
--- a/clang/test/CXX/drs/dr14xx.cpp
+++ b/clang/test/CXX/drs/dr14xx.cpp
@@ -488,16 +488,6 @@ namespace dr1467 {  // dr1467: 3.7 c++11
     }
   } // nonaggregate
 
-  namespace SelfInitIsNotListInit {
-    struct S {
-      S();
-      explicit S(S &);
-      S(const S &);
-    };
-    S s1;
-    S s2 = {s1}; // ok, not list-initialization so we pick the non-explicit constructor
-  }
-
   struct NestedInit { int a, b, c; };
   NestedInit ni[1] = {{NestedInit{1, 2, 3}}};
 
diff --git a/clang/test/CXX/drs/dr21xx.cpp b/clang/test/CXX/drs/dr21xx.cpp
index a7e50df3f374be..9d2016262712d1 100644
--- a/clang/test/CXX/drs/dr21xx.cpp
+++ b/clang/test/CXX/drs/dr21xx.cpp
@@ -11,6 +11,16 @@
 // cxx98-error@-1 {{variadic macros are a C99 feature}}
 #endif
 
+namespace std {
+  __extension__ typedef __SIZE_TYPE__ size_t;
+
+  template<typename E> struct initializer_list {
+    const E *p; size_t n;
+    initializer_list(const E *p, size_t n);
+    initializer_list();
+  };
+}
+
 namespace dr2100 { // dr2100: 12
   template<const int *P, bool = true> struct X {};
   template<typename T> struct A {
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12
 #endif
 }
 
+namespace dr2137 { // dr2137: 18
+#if __cplusplus >= 201103L
+  struct Q {
+    Q();
+    Q(Q&&);
+    Q(std::initializer_list<Q>) = delete; // expected-note 2 {{has been explicitly marked deleted here}}
+  };
+
+  Q x = Q { Q() }; // expected-error {{call to deleted constructor}}
+
+  int f(Q); // expected-note {{passing argument to parameter here}}
+  int y = f({ Q() }); // expected-error {{call to deleted constructor}}
+
+  struct U {
+    U();
+    U(const U&);
+  };
+
+  struct Derived : U {
+    Derived();
+    Derived(const Derived&);
+  } d;
+
+  int g(Derived);
+  int g(U(&&)[1]) = delete;
+
+  int z = g({ d });
+#endif
+}
+
 namespace dr2140 { // dr2140: 9
 #if __cplusplus >= 201103L
   union U { int a; decltype(nullptr) b; };
diff --git a/clang/test/CXX/drs/dr23xx.cpp b/clang/test/CXX/drs/dr23xx.cpp
index d2f4e7652ab568..8aa04c917846fa 100644
--- a/clang/test/CXX/drs/dr23xx.cpp
+++ b/clang/test/CXX/drs/dr23xx.cpp
@@ -6,6 +6,16 @@
 // RUN: %clang_cc1 -std=c++23 %s -verify=expected,since-cxx11,since-cxx14,since-cxx17,since-cxx20 -fexceptions -fcxx-exceptions -pedantic-errors 2>&1 | FileCheck %s
 // RUN: %clang_cc1 -std=c++2c %s -verify=expected,since-cxx11,since-cxx14,since-cxx17,since-cxx20 -fexceptions -fcxx-exceptions -pedantic-errors 2>&1 | FileCheck %s
 
+namespace std {
+  __extension__ typedef __SIZE_TYPE__ size_t;
+
+  template<typename E> struct initializer_list {
+    const E *p; size_t n;
+    initializer_list(const E *p, size_t n);
+    initializer_list();
+  };
+}
+
 #if __cplusplus >= 201103L
 namespace dr2303 { // dr2303: 12
 template <typename... T>
@@ -47,6 +57,80 @@ void g() {
 } //namespace dr2303
 #endif
 
+namespace dr2311 {  // dr2311: 18 open
+#if __cplusplus >= 201707L
+template<typename T>
+void test() {
+  // Ensure none of these expressions try to call a move constructor.
+  T a = T{T(0)};
+  T b{T(0)};
+  auto c{T(0)};
+  T d = {T(0)};
+  auto e = {T(0)};
+#if __cplusplus >= 202302L
+  auto f = auto{T(0)};
+#endif
+  void(*fn)(T);
+  fn({T(0)});
+}
+
+struct NonMovable {
+  NonMovable(int);
+  NonMovable(NonMovable&&) = delete;
+};
+struct NonMovableNonApplicableIList {
+  NonMovableNonApplicableIList(int);
+  NonMovableNonApplicableIList(NonMovableNonApplicableIList&&) = delete;
+  NonMovableNonApplicableIList(std::initializer_list<int>);
+};
+struct ExplicitMovable {
+  ExplicitMovable(int);
+  explicit ExplicitMovable(ExplicitMovable&&);
+};
+struct ExplicitNonMovable {
+  ExplicitNonMovable(int);
+  explicit ExplicitNonMovable(ExplicitNonMovable&&) = delete;
+};
+struct ExplicitNonMovableNonApplicableIList {
+  ExplicitNonMovableNonApplicableIList(int);
+  explicit ExplicitNonMovableNonApplicableIList(ExplicitNonMovableNonApplicableIList&&) = delete;
+  ExplicitNonMovableNonApplicableIList(std::initializer_list<int>);
+};
+struct CopyOnly {
+  CopyOnly(int);
+  CopyOnly(const CopyOnly&);
+  CopyOnly(CopyOnly&&) = delete;
+};
+struct ExplicitCopyOnly {
+  ExplicitCopyOnly(int);
+  explicit ExplicitCopyOnly(const ExplicitCopyOnly&);
+  explicit ExplicitCopyOnly(ExplicitCopyOnly&&) = delete;
+};
+
+template void test<NonMovable>();
+template void test<NonMovableNonApplicableIList>();
+template void test<ExplicitMovable>();
+template void test<ExplicitNonMovable>();
+template void test<ExplicitNonMovableNonApplicableIList>();
+template void test<CopyOnly>();
+template void test<ExplicitCopyOnly>();
+
+struct any {
+    template<typename T>
+    any(T&&);
+};
+
+template<typename T>
+struct X {
+    X();
+    X(T) = delete;  // expected-note {{'X' has been explicitly marked deleted here}}
+};
+
+X<std::initializer_list<any>> x{ X<std::initializer_list<any>>() };  // expected-error {{call to deleted constructor of 'X<std::initializer_list<any>>'}}
+
+#endif
+}
+
 // dr2331: na
 
 #if __cplusplus >= 201103L
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 4a3ed19161f9a5..391c611480820c 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -12630,7 +12630,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
     <td><a href="https://cplusplus.github.io/CWG/issues/2137.html">2137</a></td>
     <td>CD4</td>
     <td>List-initialization from object of same type</td>
-    <td class="unknown" align="center">Unknown</td>
+    <td class="unreleased" align="center">Clang 18</td>
   </tr>
   <tr id="2138">
     <td><a href="https://cplusplus.github.io/CWG/issues/2138.html">2138</a></td>
@@ -13674,7 +13674,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
     <td><a href="https://cplusplus.github.io/CWG/issues/2311.html">2311</a></td>
     <td>open</td>
     <td>Missed case for guaranteed copy elision</td>
-    <td align="center">Not resolved</td>
+    <td class="unreleased" align="center">Clang 18</td>
   </tr>
   <tr id="2312">
     <td><a href="https://cplusplus.github.io/CWG/issues/2312.html">2312</a></td>
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_U_V_move.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_U_V_move.pass.cpp
index 3b2d093eb34d49..30fdb19fd3aebe 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_U_V_move.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_U_V_move.pass.cpp
@@ -121,7 +121,26 @@ int main(int, char**)
         test_pair_rv<CopyOnly, CopyOnly&>();
         test_pair_rv<CopyOnly, CopyOnly&&>();
 
-        test_pair_rv<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly>();
+        /* For ExplicitTypes::CopyOnly, two of the viable candidates for initializing from a non-const xvalue are:
+         *   pair(const pair&);  // (defaulted copy constructor)
+         *   template<class U1, class U2> explicit pair(const pair<U1, U2>&&); [U1 = ExplicitTypes::CopyOnly, U2 = int]
+         * This results in diverging behavior for test_convertible which uses copy-list-initialization
+         * Prior to CWG2137, this would have selected the first (non-explicit) ctor as explicit ctors would not be considered
+         * Afterwards, it should select the second since it is a better match, and then failed because it is explicit
+         *
+         * This may change with future defect reports, and some compilers only have partial support for CWG2137,
+         * so use std::is_convertible directly to avoid a copy-list-initialization
+         */
+        {
+          using P1  = std::pair<ExplicitTypes::CopyOnly, int>;
+          using P2  = std::pair<int, ExplicitTypes::CopyOnly>;
+          using UP1 = std::pair<ExplicitTypes::CopyOnly, int>&&;
+          using UP2 = std::pair<int, ExplicitTypes::CopyOnly>&&;
+          static_assert(std::is_constructible<P1, UP1>::value, "");
+          static_assert(std::is_convertible<P1, UP1>::value, "");
+          static_assert(std::is_constructible<P2, UP2>::value, "");
+          static_assert(std::is_convertible<P2, UP2>::value, "");
+        }
         test_pair_rv<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&, true, false>();
         test_pair_rv<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&&, true, false>();
 

Copy link
Contributor

@cor3ntin cor3ntin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the comments made on phab have been applied, and I do believe this implements the DRs (or their intent)

Please give a few days for other folks to look at it before merging.
@zygoloid in particular as he opened CW2311

@cor3ntin
Copy link
Contributor

@mordante ping for visibility (you approved that on Phab already)

clang/test/CXX/drs/dr21xx.cpp Outdated Show resolved Hide resolved
Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cor3ntin. The patch still looks fine from libc++'s PoV.

clang/test/CXX/drs/dr21xx.cpp Outdated Show resolved Hide resolved
@MitalAshok MitalAshok force-pushed the cwg2137 branch 2 times, most recently from 90bd344 to 2c8bd47 Compare January 13, 2024 14:39
Copy link
Contributor

@Endilll Endilll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect to me now. Thank you!

@cor3ntin
Copy link
Contributor

@MitalAshok the bot found some trailing whitespace issues

@MitalAshok
Copy link
Contributor Author

@cor3ntin It looks like it was in an unrelated file. I've rebased and the format check is passing now

@cor3ntin
Copy link
Contributor

Do you want me to merge on your behalf?

@MitalAshok
Copy link
Contributor Author

@cor3ntin Still waiting for Windows checks, but yes, could you merge if you please

@cor3ntin
Copy link
Contributor

Let me merge that lest I forget. Our windows bots have a lot of issues

@cor3ntin cor3ntin merged commit 9247013 into llvm:main Jan 19, 2024
43 of 44 checks passed
@alexfh
Copy link
Contributor

alexfh commented Jan 24, 2024

We've started seeing call to constructor of 'SomeType' is ambiguous errors after this patch on some code. In the case I closely inspected the code looks like https://gcc.godbolt.org/z/3MbWf69cx:

#include <vector>
struct A {
    A() {}
};

struct B {
    explicit B(A);
    explicit B(std::vector<A>);
};

struct C {
    B b;
    C() : b({A()}) {}
};

Is the new error expected? (I would totally agree with it, just making sure. And the behavior is now different to that of GCC trunk.)

@alexfh
Copy link
Contributor

alexfh commented Jan 24, 2024

Actually, on the second look it doesn't seem to be too ambiguous to me. I think std::vector<A> should be a strictly better match in this case.

DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Feb 21, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
@yxsamliu
Copy link
Collaborator

yxsamliu commented Feb 21, 2024

This PR caused a regression for AMDMIGraphX https://github.com/ROCm/AMDMIGraphX/blob/develop/src/targets/gpu/include/migraphx/gpu/prefix_scan_sum.hpp#L57

A reduced test case is:

#include <vector>
#include <stdio.h>
using namespace std;

struct A {
    int x;
    A(int x_) : x(x_) {}
    A(const vector<A>& a) {}
};

int main() {
    vector<A> a{1,2};
    vector<A> b{a};

    printf("%ld\n", b.size());
}

For variable b, it is expected to be constructed by copy ctor of vector, and have 2 elements.

With this patch, a is first converted to A(a), then b is constructed with one element A(a).

Is this expected or a bug? Thanks.

gcc has the same behavior https://godbolt.org/z/hTb795xWP

@yxsamliu
Copy link
Collaborator

The issue above seems to be a clang bug to me according to https://cplusplus.github.io/CWG/issues/1467.html

List-initialization of an object or reference of type T is defined as follows:

If T is a class type and the initializer list has a single element of type cv T or a class type derived from T, the object is initialized from that element.

Therefore b should be initialized from a instead of A(a).

DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Feb 22, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
emaste added a commit to emaste/freebsd that referenced this pull request Feb 24, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
emaste added a commit to emaste/freebsd that referenced this pull request Feb 26, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
emaste added a commit to emaste/freebsd that referenced this pull request Mar 1, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
emaste added a commit to emaste/freebsd that referenced this pull request Mar 5, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Mar 10, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
emaste added a commit to emaste/freebsd that referenced this pull request Mar 17, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Mar 19, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
emaste added a commit to emaste/freebsd that referenced this pull request Mar 19, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Mar 21, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
emaste added a commit to emaste/freebsd that referenced this pull request Mar 21, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Mar 21, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
emaste added a commit to emaste/freebsd that referenced this pull request Mar 22, 2024
commit a7fb520
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 22:50:52 2024 +0100

    Update libllvm for new RISCVGenMacroFusion.inc tblgen header.

commit 92e38d7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 19:01:09 2024 +0100

    Update libllvm for removed file.

commit 1f05b14
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 16:59:11 2024 +0100

    Bump llvm-project version numbers to llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit dd2f072
Merge: 024a010 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:58:02 2024 +0100

    Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

    PR:		276104
    MFC after:	1 month

commit 024a010
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 12:41:51 2024 +0100

    [libc++] Rename __bit_reference template parameter to avoid conflict

    As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference`
    contains a template `__fill_n` with a bool `_FillValue` parameter.

    Unfortunately there is a relatively widely used piece of scientific
    software called NetCDF, which exposes a (C) macro `_FillValue` in its
    public headers.

    When building the NetCDF C++ bindings, this quickly leads to compilation
    errors when the macro interferes with the template in `__bit_reference`.

    Rename the parameter to `_FillVal` to avoid the conflict.

commit 4721947
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Feb 5 10:16:17 2024 +0100

    Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):

      [Clang][AST] Fix a crash on attaching doc comments (#78716)

      This crash is basically caused by calling
      `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
      `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
      files. A reduced reproducer is provided in this patch.

      After the source locations for instantiations of funtion template are
      corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
      variable `CommitsInThisFile` in the function
      `ASTContext::attachCommentsToJustParsedDecls` would refer to the source
      file rather than the header file for implicit function template
      instantiation. Therefore, in the first loop in
      `ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
      adjusted for relevant scenarios like the second loop.

      Fixes #67979
      Fixes #68524
      Fixes #70550

    This should fix a segfault when compiling graphics/gdal.

commit d4389cf
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 28 21:34:42 2024 +0100

    Merge commit 6e4930c67508 from llvm-project (by Alexander Kornienko):

      Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

      This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
      errors on valid code, see
      llvm/llvm-project#77768 (comment).

commit 638a121
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:21:16 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18361-g22683463740e (and 18.1.0).

commit fb7b27d
Merge: 2ed68de 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:04:14 2024 +0100

    Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

    PR:		276104
    MFC after:	1 month

commit 2ed68de
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:03:20 2024 +0100

    Tentatively apply libcxxrt/libcxxrt#27.

commit a0cf20a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 26 16:02:51 2024 +0100

    libc++: use build defines and flags similar to upstream.

commit 66f3903
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 09:27:12 2024 +0100

    Add one more header to libc++.

commit ddf7238
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 00:39:43 2024 +0100

    Update libclang, libllvm, llc and lli Makefiles.

commit e025714
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:35:46 2024 +0100

    Update libc++ generated files, and add __assertion_handler.

commit e7cb0e2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:31:39 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-18359-g93248729cfae.

commit efd9603
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:23:36 2024 +0100

    Update contrib/llvm-project/FREEBSD-Xlist.

commit 550d813
Merge: 74464e8 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:17:23 2024 +0100

    Merge llvm-project main llvmorg-18-init-18359-g93248729cfae

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
    last commit before the upstream release/18.x branch was created.

    PR:		276104
    MFC after:	1 month

commit 74464e8
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 15 00:18:22 2024 +0100

    Tabify libc++ Makefile.

commit 1fbb16e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 14 14:20:42 2024 +0100

    Redo libc++ customizations:
    * Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
    * Instead, add direct major __FreeBSD__ check for using ::gets declaration
    * Mark EINTEGRITY values as FreeBSD customization
    * Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

commit f6cfebe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 14:47:52 2024 +0100

    Update libc++ module.modulemap.

commit 2c45cec
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Fri Jan 12 10:57:07 2024 +0100

    Fixup libllvm Makefile for DWARFLinker stuff being moved around.

commit 1f35f87
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:30:38 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16864-g3b3ee1f53424.

commit 7b02ddb
Merge: 6ec4eed 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:29:01 2024 +0100

    Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

    PR:		276104
    MFC after:	1 month

commit 6ec4eed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:49:11 2024 +0100

    Update libllvm and llvm-tblgen Makefiles.

commit b861bf2
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 14:48:50 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16595-g7c00a5be5cde.

commit 42aaf55
Merge: c8faa43 aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 21:00:28 2024 +0100

    Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

    PR:		276104
    MFC after:	1 month

commit c8faa43
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 17:03:13 2024 +0100

    Tentatively merge llvm/llvm-project#77242:

      [libcxx] Re-include <osreldate.h> in __config for FreeBSD

      In 0a97720d0197 some changes were made to `__config` for assuming that
      `__BYTE_ORDER__` is always present.

      However, this deleted a `<osreldate.h>` include for FreeBSD, which is
      required to get the value of `__FreeBSD_version`, and that is used later
      in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
      enabled.

      Include `<osreldate.h>` just after the other includes used for feature
      detection, to fix this.

      Note that when FreeBSD 13 is EOLed, this can be removed, as then all
      supported FreeBSD versions will no longer have `gets()`.

commit 9db148e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:32:29 2024 +0100

    Add two FreeBSD customizations to libc++, to better support ports usage
    of older clang versions:
    * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
      version checks, to avoid any warnings about support. This makes some
      ports that use -Werror fall over.
    * When using clang < 15.0, avoid using a type visibility attribute on
      the std namespace, as older versions of clang do not support this.

commit ab1dc4a
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Jan 7 12:28:35 2024 +0100

    Fix up ObsoleteFiles entries for libc++.

commit 626eed6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Jan 6 20:55:41 2024 +0100

    Add more clang 17 ObsoleteFiles entries.

commit d23764d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 20:35:30 2024 +0100

    Add files needed for lldb FreeBSD-Kernel DynamicLoader.

commit 7656fbd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:22:03 2024 +0100

    Bump llvm-project version numbers to llvmorg-18-init-16003-gfc5f51cf5af4.

commit 9739ebd
Merge: b8840b4 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 19:04:11 2024 +0100

    Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

    PR:		276104
    MFC after:	1 month

commit b8840b4
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:09:41 2024 +0100

    compiler-rt builtins: move 80-bit long double functions into their own
    block, only enabling it for x86, and add more 128-bit quad functions.

commit b3086e6
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 2 17:07:31 2024 +0100

    Revert upstream commit 0e46b49de433:

      Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

      This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

      PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

    Since it causes an assertion failure building /sys/dev/fb/vga.c:
    llvm/llvm-project#76416

commit c71a0fe
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Jan 1 18:58:15 2024 +0100

    Apply llvmorg-18-init-15846-g953ae94149f0.

commit fab14fd
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 19:20:33 2023 +0100

    Add new files and remove deleted files from various Makefiles.

commit 5d05e48
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:50:08 2023 +0100

    Bump llvm-project version numbers to llvmorg-18-init-15692-g007ed0dccd6a.

commit 678f56a
Merge: 5f710e3 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 18:35:41 2023 +0100

    Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

    PR:		276104
    MFC after:	1 month

commit 5f710e3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 23:30:02 2023 +0100

    Tentatively apply llvm/llvm-project#76175, to
    fix libsa including compiler-rt builtins.

commit bfd4f0d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 16:56:34 2023 +0100

    Add several new builtins to compiler-rt, and enable quad support for amd64.

commit 60b6608
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Dec 21 14:47:43 2023 +0100

    Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.

commit b051bbb
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:05:48 2023 +0100

    Update libomp generated headers.

commit 98d0e7c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 23:00:26 2023 +0100

    Update libclang_rt makefiles.

commit a08a308
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 21:41:18 2023 +0100

    Update build glue for libc++.

commit 326d983
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Dec 20 19:47:22 2023 +0100

    Fix up clang version in lib/libclang_rt/compiler-rt-vars.mk.

commit 325ba5b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 23:43:32 2023 +0100

    Update build glue to build lldb.

commit 612cd33
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:54:32 2023 +0100

    Regenerate lib/clang/liblldb/LLDBWrapLua.cpp.

commit 12d2341
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 21:48:16 2023 +0100

    Update build glue to build llvm extra tools.

commit bd80bb1
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 20:10:38 2023 +0100

    Update build glue to build full clang (with static analyzer).

commit 0e60a9e
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 19:30:46 2023 +0100

    Update build glue to build default llvm tools for world.

commit 1e1229d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:08 2023 +0100

    Add new files to libclang, and re-sort.

commit 80bc357
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 17:40:00 2023 +0100

    Add new files to libllvm, and re-sort.

commit 220597d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:31 2023 +0100

    Add newly introduced .inc files to libclang.

commit daeeb74
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 15:37:11 2023 +0100

    Cleanup removed files from libclang.

commit 69a6c58
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:34:00 2023 +0100

    After llvm/llvm-project@ac182deee8287 RISCV's
    global isel td file got split off to RISCVGISel.td, so handle that in
    libllvm's Makefile.

commit e27e76b
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Dec 19 12:27:35 2023 +0100

    Cleanup removed files from libllvm.

commit fa84ac3
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:52:45 2023 +0100

    Update Makefile for llvm-tblgen.

commit d43e62d
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:40:01 2023 +0100

    Update FREEBSD-Xlist for llvm 18.

commit a3780ea
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 22:38:45 2023 +0100

    Bump llvm-project numbers from 17.0.6 to 18.0.0.

commit 5d469ef
Merge: 8758bf0 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 18 21:30:12 2023 +0100

    Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

    PR:		276104
    MFC after:	1 month

commit 4fdf604
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Feb 7 15:37:28 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

commit 2d835ae
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 25 19:03:34 2024 +0100

    Vendor import of llvm-project branch release/18.x llvmorg-18-init-18361-g22683463740e.

commit 4df029c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 24 20:11:41 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-18359-g93248729cfae,
    the last commit before the upstream release/18.x branch was created.

commit 950076c
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Thu Jan 11 19:24:21 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

commit aca2e42
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Tue Jan 9 20:58:18 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

commit 77dbea0
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Wed Jan 3 17:57:07 2024 +0100

    Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

commit 99aabd7
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Mon Dec 25 14:49:57 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

commit 312c0ed
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sun Dec 17 21:41:09 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

commit b1c7353
Author: Dimitry Andric <dim@FreeBSD.org>
Date:   Sat Dec 9 14:28:42 2023 +0100

    Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1.
DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Apr 5, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
DimitryAndric added a commit to DimitryAndric/freebsd-src that referenced this pull request Apr 5, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request Apr 6, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).

In particular, this fixes bogus "call to constructor of 'SomeType' is
ambiguous" errors.

PR:		276104
MFC after:	1 month
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request Apr 20, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).

In particular, this fixes bogus "call to constructor of 'SomeType' is
ambiguous" errors.

PR:		276104
MFC after:	1 month

(cherry picked from commit ddbac70)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request Apr 20, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).

In particular, this fixes bogus "call to constructor of 'SomeType' is
ambiguous" errors.

PR:		276104
MFC after:	1 month

(cherry picked from commit ddbac70)
@pointhex pointhex mentioned this pull request May 7, 2024
@yxsamliu
Copy link
Collaborator

This is mostly just a call to coordinate a bit better. I would suggest that if the patch author is engaged on the thread, it would make sense to tell them the schedule on which you plan to revert so they have an opportunity to tell you if that's going to be disruptive.

This part captures one particular issue with my way of action I happened to miss. Thanks for putting this clearly @AaronBallman! Coordination was indeed far from perfect here. And your suggestion totally makes sense.

While I realize this is the 'policy', I'm asking for compassion, particularly with new developers who are engaging.

This is also a good point @erichkeane. I'll try to consider this as well.

Any plan to reland this PR? cuDF/hipDF depends on it. Also the subtle difference of behavior about list initialization between clang/gcc causes issues that are difficult to debug. Thanks.

ldionne pushed a commit that referenced this pull request Jul 6, 2024
…37 (#97403)

https://cplusplus.github.io/CWG/issues/2137.html

This change was previously made as part of
9247013 (#77768) and later reverted in
6e4930c

This change is still needed because the comment is still true: A
standards-conformant compiler is currently supposed to fail this test.

This also means that any future work on CWG2137 with Clang would not
need to modify the libc++ test suite
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 7, 2024
  Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)"

  This reverts commit 924701311aa79180e86ad8ce43d253f27d25ec7d. Causes compilation
  errors on valid code, see
  llvm/llvm-project#77768 (comment).

In particular, this fixes bogus "call to constructor of 'SomeType' is
ambiguous" errors.

PR:		276104
MFC after:	1 month
AaronBallman pushed a commit that referenced this pull request Aug 8, 2024
…me type) (#94355)

[CWG2137](https://cplusplus.github.io/CWG/issues/2137.html)

This was previously implemented and then reverted in Clang 18 as #77768

This also implements a workaround for
[CWG2311](https://cplusplus.github.io/CWG/issues/2311.html), similarly
to the 2024-03-01 comment for
[CWG2742](https://cplusplus.github.io/CWG/issues/2742.html).

The exact wording this tries to implement, relative to the C++26 draft:

[over.match.list]p(1.2)

> Otherwise, or if no viable initializer-list constructor is found
<ins>and the initializer list does not consist of exactly a single
element with the same cv-unqualified class type as `T`</ins>, overload
resolution is performed again, [...]

[dcl.init.list]p(3.7)

> Otherwise, if `T` is a class type, constructors are considered. The
applicable constructors are enumerated and the best one is chosen
through overload resolution. <ins>If no constructor is found and the
initializer list consists of exactly a single element with the same
cv-unqualified class type as `T`, the object is initialized from that
element (by copy-initialization for copy-list-initialization, or by
direct-initialization for direct-list-initialization). Otherwise,</ins>
if a narrowing conversion (see below) is required [...]
kstoimenov pushed a commit to kstoimenov/llvm-project that referenced this pull request Aug 15, 2024
…me type) (llvm#94355)

[CWG2137](https://cplusplus.github.io/CWG/issues/2137.html)

This was previously implemented and then reverted in Clang 18 as llvm#77768

This also implements a workaround for
[CWG2311](https://cplusplus.github.io/CWG/issues/2311.html), similarly
to the 2024-03-01 comment for
[CWG2742](https://cplusplus.github.io/CWG/issues/2742.html).

The exact wording this tries to implement, relative to the C++26 draft:

[over.match.list]p(1.2)

> Otherwise, or if no viable initializer-list constructor is found
<ins>and the initializer list does not consist of exactly a single
element with the same cv-unqualified class type as `T`</ins>, overload
resolution is performed again, [...]

[dcl.init.list]p(3.7)

> Otherwise, if `T` is a class type, constructors are considered. The
applicable constructors are enumerated and the best one is chosen
through overload resolution. <ins>If no constructor is found and the
initializer list consists of exactly a single element with the same
cv-unqualified class type as `T`, the object is initialized from that
element (by copy-initialization for copy-list-initialization, or by
direct-initialization for direct-list-initialization). Otherwise,</ins>
if a narrowing conversion (see below) is required [...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[D156032] Implement CWG2137 (list-initialization from objects of the same type)
10 participants