From 835c3a3e69af562ec6d4ec3639938c96dad1697e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 11 Sep 2024 12:17:00 +0200 Subject: [PATCH] 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 14d1f395af9..de50786f4d6 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;