git: 835c3a3e69af - main - Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser):

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 23 Oct 2024 18:31:47 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=835c3a3e69af562ec6d4ec3639938c96dad1697e

commit 835c3a3e69af562ec6d4ec3639938c96dad1697e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-11 10:17:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-10-23 18:27:19 +0000

    Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser):
    
      [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (#107815)
    
      Fixes #107777
    
    This fixes an assertion failure building www/qt5-webengine:
    
      Assertion failed: (Loc.isValid() && "point of instantiation must be valid!"), function setPointOfInstantiation, file contrib/llvm-project/clang/include/clang/AST/DeclTemplate.h, line 1938.
    
    PR:             280562
    MFC after:      1 month
---
 contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
index 14d1f395af90..de50786f4d6c 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
@@ -5140,7 +5140,8 @@ static bool HasNonDeletedDefaultedEqualityComparison(Sema &S,
 
     // const ClassT& obj;
     OpaqueValueExpr Operand(
-        {}, Decl->getTypeForDecl()->getCanonicalTypeUnqualified().withConst(),
+        KeyLoc,
+        Decl->getTypeForDecl()->getCanonicalTypeUnqualified().withConst(),
         ExprValueKind::VK_LValue);
     UnresolvedSet<16> Functions;
     // obj == obj;