Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package llvm18 for openSUSE:Factory checked in at 2026-08-04 21:30:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm18 (Old) and /work/SRC/openSUSE:Factory/.llvm18.new.16738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm18" Tue Aug 4 21:30:12 2026 rev:19 rq:1369232 version:18.1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/llvm18/llvm18.changes 2026-06-12 19:26:23.303335573 +0200 +++ /work/SRC/openSUSE:Factory/.llvm18.new.16738/llvm18.changes 2026-08-04 21:30:21.511642270 +0200 @@ -1,0 +2,17 @@ +Sun Aug 2 21:30:32 UTC 2026 - Aaron Puchert <[email protected]> + +- Fix build with libstdc++ 16: + * Add clang-Sema-fix-crash-of-attribute-transform.patch to fix + instantiation of trailing return type using `decltype`. + * Define _GLIBCXX_USE_OLD_GENERATE_CANONICAL for C++ because + Clang 18 doesn't know __builtin_popcountg. (This doesn't help + users, but allows us to build LLVM/Clang. Not sure if we should + port back the builtin.) + +------------------------------------------------------------------- +Sun Jul 26 13:47:48 UTC 2026 - Aaron Puchert <[email protected]> + +- Add compiler-rt-Remove-linux-scc-h.patch to remove <linux/scc.h> + include that was removed in Linux 7.1 (boo#1271641). + +------------------------------------------------------------------- New: ---- clang-Sema-fix-crash-of-attribute-transform.patch compiler-rt-Remove-linux-scc-h.patch ----------(New B)---------- New:- Fix build with libstdc++ 16: * Add clang-Sema-fix-crash-of-attribute-transform.patch to fix instantiation of trailing return type using `decltype`. New: - Add compiler-rt-Remove-linux-scc-h.patch to remove <linux/scc.h> include that was removed in Linux 7.1 (boo#1271641). ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ llvm18.spec ++++++ --- /var/tmp/diff_new_pack.DvhYFB/_old 2026-08-04 21:30:23.955727067 +0200 +++ /var/tmp/diff_new_pack.DvhYFB/_new 2026-08-04 21:30:23.959727206 +0200 @@ -437,6 +437,12 @@ Patch33: gcc15-add-necessary-includes.patch # PATCH-FIX-UPSTREAM: Remove interceptors for deprecated struct termio Patch34: compiler-rt-remove-termio-interceptors.patch +# PATCH-FIX-UPSTREAM: https://github.com/llvm/llvm-project/commit/3dc4fd6dd41100f051a63642f449b16324389c96 +# Fixes build with Linux 7.1. +Patch35: compiler-rt-Remove-linux-scc-h.patch +# PATCH-FIX-UPSTREAM: https://github.com/llvm/llvm-project/commit/d9d1ae6400a7f8a12068bdd37ecda62f07e52bce +# Fixes build with libstdc++ 16. +Patch36: clang-Sema-fix-crash-of-attribute-transform.patch BuildRequires: binutils-devel >= 2.21.90 BuildRequires: cmake >= 3.13.4 BuildRequires: fdupes @@ -896,6 +902,7 @@ %patch -P 29 -p2 %patch -P 30 -p2 %patch -P 31 -p2 +%patch -P 36 -p2 # We hardcode openSUSE rm unittests/Driver/DistroTest.cpp @@ -911,6 +918,7 @@ pushd compiler-rt-%{_version}.src %patch -P 34 -p2 +%patch -P 35 -p2 popd pushd openmp-%{_version}.src @@ -1078,7 +1086,8 @@ fi CFLAGS=$flags -CXXFLAGS=$flags +# 5) Define _GLIBCXX_USE_OLD_GENERATE_CANONICAL for C++ because Clang 18 doesn't know __builtin_popcountg. +CXXFLAGS="$flags -D_GLIBCXX_USE_OLD_GENERATE_CANONICAL" # Clang uses a bit less memory. mem_per_compile_job=700000 ++++++ clang-Sema-fix-crash-of-attribute-transform.patch ++++++ >From d9d1ae6400a7f8a12068bdd37ecda62f07e52bce Mon Sep 17 00:00:00 2001 From: Qizhi Hu <[email protected]> Date: Fri, 26 Jan 2024 14:26:53 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform (#78088) Try to fix [issue](https://github.com/llvm/llvm-project/issues/73619) 1. During transforming `FunctionProtoType`, if `ThisContext` is `nullptr` and `CurrentContext` is `ClassTemplateSpecializationDecl`, Constructor of `CXXThisScopeRAII` and `Sema::getCurrentThisType` won't set `CXXThisTypeOverride` of Sema. This will lead to building `this` in `RebuildCXXThisExpr` with a invalid type(NULL type) and cause crash. 2. During transforming attribute type, if `modifiedType` of attribute type is changed, `EquivalentType` need to be transformed. If `EquivalentType` is `FunctionProtoType`, its `ParamVarDecl` will not be copyed(but parameter num does) and will not be instanced in `TransformFunctionTypeParams` since `ParamVarDecl` is `nullptr`. This will lead to crash in `findInstantiationOf`(can't find the instance of `ParamVarDecl`). This patch tries to fix these issues above. 1. If `CurrentContext` is `ClassTemplateSpecializationDecl`, Use it. 2. Use `EquivalentTypeLoc` instead of `EquivalentType` since it has parameter info. But, if use current `TypeLocBuilder`, it will crash in `TypeLocBuilder::push` since `LastType` is mismatch. Use an auxiliary `TypeLocBuilder` instead and get transformed `EquivalentType`. Co-authored-by: huqizhi <[email protected]> --- clang/include/clang/AST/TypeLoc.h | 4 ++++ clang/lib/Sema/TreeTransform.h | 12 +++++++----- clang/test/Sema/attr-lifetimebound-no-crash.cpp | 17 +++++++++++++++++ 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 clang/test/Sema/attr-lifetimebound-no-crash.cpp diff --git a/clang/include/clang/AST/TypeLoc.h b/clang/include/clang/AST/TypeLoc.h index 471deb14aba51..04780fdeae3bc 100644 --- a/clang/include/clang/AST/TypeLoc.h +++ b/clang/include/clang/AST/TypeLoc.h @@ -884,6 +884,10 @@ class AttributedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, return getInnerTypeLoc(); } + TypeLoc getEquivalentTypeLoc() const { + return TypeLoc(getTypePtr()->getEquivalentType(), getNonLocalData()); + } + /// The type attribute. const Attr *getAttr() const { return getLocalData()->TypeAttr; diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index e55e752b9cc35..40028544e23c8 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -6131,7 +6131,9 @@ QualType TreeTransform<Derived>::TransformFunctionProtoType( // "pointer to cv-qualifier-seq X" between the optional cv-qualifer-seq // and the end of the function-definition, member-declarator, or // declarator. - Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext, ThisTypeQuals); + auto *RD = dyn_cast<CXXRecordDecl>(SemaRef.getCurLexicalContext()); + Sema::CXXThisScopeRAII ThisScope( + SemaRef, !ThisContext && RD ? RD : ThisContext, ThisTypeQuals); ResultType = getDerived().TransformType(TLB, TL.getReturnLoc()); if (ResultType.isNull()) @@ -7088,10 +7090,10 @@ QualType TreeTransform<Derived>::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { - // TODO: this is really lame; we should really be rebuilding the - // equivalent type from first principles. - QualType equivalentType - = getDerived().TransformType(oldType->getEquivalentType()); + TypeLocBuilder AuxiliaryTLB; + AuxiliaryTLB.reserve(TL.getFullDataSize()); + QualType equivalentType = + getDerived().TransformType(AuxiliaryTLB, TL.getEquivalentTypeLoc()); if (equivalentType.isNull()) return QualType(); diff --git a/clang/test/Sema/attr-lifetimebound-no-crash.cpp b/clang/test/Sema/attr-lifetimebound-no-crash.cpp new file mode 100644 index 0000000000000..e668a78790def --- /dev/null +++ b/clang/test/Sema/attr-lifetimebound-no-crash.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only + +// expected-no-diagnostics + +template<typename T> +struct Bar { + int* data; + + auto operator[](const int index) const [[clang::lifetimebound]] -> decltype(data[index]) { + return data[index]; + } +}; + +int main() { + Bar<int> b; + (void)b[2]; +} ++++++ compiler-rt-Remove-linux-scc-h.patch ++++++ >From 3dc4fd6dd41100f051a63642f449b16324389c96 Mon Sep 17 00:00:00 2001 From: cqwrteur <[email protected]> Date: Sat, 25 Apr 2026 14:23:32 +0800 Subject: [PATCH] [compiler-rt][sanitizer] Remove linux/scc.h (#194116) #194110 Linux Kernel has removed scc.h header completely from the source code Therefore, we need to remove the usage in compiler-rt/sanitizer too. https://github.com/torvalds/linux/commit/64edfa65062dc4509ba75978116b2f6d392346f5#diff-1ca78e598a5041ee51ae795d168435afad598b82a7a0ce80f215993589b96c7c Without removing it, not only it breaks compiler-rt but also GCC build since GCC always builds libsanitizer for linux targets. After merging this we will need to cherry pick to GCC. --- .../sanitizer_platform_limits_posix.cpp | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp index 39e157d278948..3ea9002f5f19e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp @@ -152,16 +152,15 @@ typedef struct user_fpregs elf_fpregset_t; #if defined(__mips64) # include <sys/procfs.h> #endif -#include <sys/user.h> -#include <linux/if_eql.h> -#include <linux/if_plip.h> -#include <linux/lp.h> -#include <linux/mroute.h> -#include <linux/mroute6.h> -#include <linux/scc.h> -#include <linux/serial.h> -#include <sys/msg.h> -#include <sys/ipc.h> +# include <linux/if_eql.h> +# include <linux/if_plip.h> +# include <linux/lp.h> +# include <linux/mroute.h> +# include <linux/mroute6.h> +# include <linux/serial.h> +# include <sys/ipc.h> +# include <sys/msg.h> +# include <sys/user.h> #endif // SANITIZER_ANDROID #include <link.h> @@ -537,8 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); unsigned struct_kbsentry_sz = sizeof(struct kbsentry); unsigned struct_mtconfiginfo_sz = sizeof(struct mtconfiginfo); unsigned struct_nr_parms_struct_sz = sizeof(struct nr_parms_struct); - unsigned struct_scc_modem_sz = sizeof(struct scc_modem); - unsigned struct_scc_stat_sz = sizeof(struct scc_stat); unsigned struct_serial_multiport_struct_sz = sizeof(struct serial_multiport_struct); unsigned struct_serial_struct_sz = sizeof(struct serial_struct);
