[libcxx-commits] [clang] [libc] [libcxx] [clang][X86] Emit AVX level mismatch psABI warnings on function definitions (PR #199091)
Benjamin Luke via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 1 11:58:52 PDT 2026
https://github.com/freaknbigpanda updated https://github.com/llvm/llvm-project/pull/199091
>From 5c390db7fb4181395dbd1435d513751df242dc45 Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Wed, 20 May 2026 11:53:38 -0700
Subject: [PATCH 01/12] [clang][X86] Emit AVX level mismatch psABI warnings on
function definitions
Emit -WpsABI for x86_64 function definitions whose return type or
parameter type uses a vector wider than 128 bits without the required ABI
feature enabled. 256-bit vectors require avx, and 512-bit vectors require
avx512f.
Previously this diagnostic was only emitted at call sites, so definitions
with wide vector signatures could be introduced without a warning until
they were called. Use the function feature map so
attribute(target("avx/avx512f")) definitions are accepted, and emit no
warnings for prototype-only declarations.
---
clang/lib/CodeGen/Targets/X86.cpp | 51 +++++++++++++++++++
clang/test/CodeGen/X86/mmx-inline-asm-error.c | 2 +
clang/test/CodeGen/target-builtin-error-3.c | 6 +++
clang/test/CodeGen/target-features-error-2.c | 1 +
clang/test/CodeGenCXX/target-avx-abi-diag.cpp | 37 ++++++++++++++
libc/src/mathvec/generic/CMakeLists.txt | 2 +
libcxx/utils/libcxx/test/params.py | 3 ++
7 files changed, 102 insertions(+)
create mode 100644 clang/test/CodeGenCXX/target-avx-abi-diag.cpp
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index 4e99ebab6ba34..37c643f14e39f 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -9,6 +9,7 @@
#include "ABIInfoImpl.h"
#include "TargetInfo.h"
#include "clang/Basic/DiagnosticFrontend.h"
+#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/SmallBitVector.h"
using namespace clang;
@@ -1509,6 +1510,9 @@ class X86_64TargetCodeGenInfo : public TargetCodeGenInfo {
const FunctionDecl *Caller,
const FunctionDecl *Callee, const CallArgList &Args,
QualType ReturnType) const override;
+
+ void checkFunctionABI(CodeGenModule &CGM,
+ const FunctionDecl *FD) const override;
};
} // namespace
@@ -1571,6 +1575,53 @@ static bool checkAVXParam(DiagnosticsEngine &Diag, ASTContext &Ctx,
return false;
}
+void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
+ const FunctionDecl *FD) const {
+ auto GetReturnTypeLoc = [](const FunctionDecl *FD) {
+ if (const TypeSourceInfo *TSI = FD->getTypeSourceInfo()) {
+ TypeLoc TL = TSI->getTypeLoc();
+
+ if (auto FTL = TL.IgnoreParens().getAs<FunctionTypeLoc>())
+ return FTL.getReturnLoc().getBeginLoc();
+ }
+
+ return FD->getLocation();
+ };
+
+ auto Check = [&](QualType Ty, SourceLocation Loc, bool IsReturn) {
+ if (!Ty->isVectorType())
+ return false;
+ if (CGM.getContext().getTypeSize(Ty) <= 128)
+ return false;
+
+ StringRef Feature =
+ CGM.getContext().getTypeSize(Ty) > 256 ? "avx512f" : "avx";
+
+ llvm::StringMap<bool> FeatureMap;
+ CGM.getContext().getFunctionFeatureMap(FeatureMap, FD);
+ if (!FeatureMap.lookup(Feature)) {
+ CGM.getDiags().Report(Loc, diag::warn_avx_calling_convention)
+ << !IsReturn << Ty << Feature;
+ return true;
+ }
+
+ return false;
+ };
+
+ // First check the return type and emit diagnostic if required
+ Check(FD->getReturnType(), GetReturnTypeLoc(FD), true);
+
+ // Go through the parameters and emit a warning for the first vector found
+ // without the matching function AVX level attribute
+ for (const ParmVarDecl *P : FD->parameters()) {
+ SourceLocation Loc = P->getLocation();
+ if (Loc.isInvalid())
+ Loc = P->getBeginLoc();
+ if (Check(P->getType(), Loc, false))
+ return;
+ }
+}
+
void X86_64TargetCodeGenInfo::checkFunctionCallABI(CodeGenModule &CGM,
SourceLocation CallLoc,
const FunctionDecl *Caller,
diff --git a/clang/test/CodeGen/X86/mmx-inline-asm-error.c b/clang/test/CodeGen/X86/mmx-inline-asm-error.c
index 8a2f991a537a2..7f7f53a553057 100644
--- a/clang/test/CodeGen/X86/mmx-inline-asm-error.c
+++ b/clang/test/CodeGen/X86/mmx-inline-asm-error.c
@@ -2,6 +2,8 @@
// RUN: %clang_cc1 -verify=omp -triple x86_64-unknown-unknown -emit-llvm-only -fopenmp %s
typedef int vec256 __attribute__((ext_vector_type(8)));
+// omp-warning at +2 {{AVX vector return of type 'vec256' (vector of 8 'int' values) without 'avx' enabled changes the ABI}}
+// omp-warning at +1 {{AVX vector argument of type 'vec256' (vector of 8 'int' values) without 'avx' enabled changes the ABI}}
vec256 foo(vec256 in) {
vec256 out;
diff --git a/clang/test/CodeGen/target-builtin-error-3.c b/clang/test/CodeGen/target-builtin-error-3.c
index 056dc940f7a93..840ca7534905d 100644
--- a/clang/test/CodeGen/target-builtin-error-3.c
+++ b/clang/test/CodeGen/target-builtin-error-3.c
@@ -17,32 +17,38 @@ typedef __attribute__ ((ext_vector_type(16),__aligned__( 64))) float float16;
static inline half8 __attribute__((__overloadable__)) convert_half( float8 a ) {
return __extension__ ({ __m256 __a = (a); (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)__a, (0x00)); }); // expected-error {{'__builtin_ia32_vcvtps2ph256' needs target feature f16c}}
}
+// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
static inline half16 __attribute__((__overloadable__)) convert_half( float16 a ) {
half16 r;
r.lo = convert_half(a.lo);
return r;
}
+// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
void avx_test( uint16_t *destData, float16 argbF)
{
((half16U *)destData)[0] = convert_half(argbF);
}
+// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
half16 test( float16 a ) {
half16 r;
r.lo = convert_half(a.lo);
return r;
}
+// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
void avx_test2( uint16_t *destData, float16 argbF)
{
// expected-warning at +1{{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
((half16U *)destData)[0] = test(argbF);
}
+// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
__attribute__((always_inline)) half16 test2( float16 a ) {
half16 r;
r.lo = convert_half(a.lo);
return r;
}
+// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
void avx_test3( uint16_t *destData, float16 argbF)
{
((half16U *)destData)[0] = test2(argbF);
diff --git a/clang/test/CodeGen/target-features-error-2.c b/clang/test/CodeGen/target-features-error-2.c
index 1599b0135b747..8f2ef35b8a931 100644
--- a/clang/test/CodeGen/target-features-error-2.c
+++ b/clang/test/CodeGen/target-features-error-2.c
@@ -8,6 +8,7 @@
#include <x86intrin.h>
#if NEED_AVX_1
+// expected-warning at +1 {{AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI}}
int baz(__m256i a) {
return _mm256_extract_epi32(a, 3); // expected-error {{'__builtin_ia32_vec_ext_v8si' needs target feature avx}}
}
diff --git a/clang/test/CodeGenCXX/target-avx-abi-diag.cpp b/clang/test/CodeGenCXX/target-avx-abi-diag.cpp
new file mode 100644
index 0000000000000..5048cb092e67f
--- /dev/null
+++ b/clang/test/CodeGenCXX/target-avx-abi-diag.cpp
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -emit-llvm -disable-llvm-passes -verify=noavx,noavx512 -o - %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -target-feature +avx -emit-llvm -disable-llvm-passes -verify=noavx512 -o - %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -target-feature +avx512f -emit-llvm -disable-llvm-passes -verify=both -o - %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -Wno-psabi -emit-llvm -disable-llvm-passes -verify=suppressed -o - %s
+// REQUIRES: x86-registered-target
+
+// both-no-diagnostics
+// suppressed-no-diagnostics
+
+typedef float v8f __attribute__((vector_size(32)));
+typedef float v16f __attribute__((vector_size(64)));
+
+// Prototype-only declarations do not warn.
+v8f proto256(v8f);
+v16f proto512(v16f);
+
+// noavx-warning at +2 {{AVX vector return of type 'v8f' (vector of 8 'float' values) without 'avx' enabled changes the ABI}}
+// noavx-warning at +1 {{AVX vector argument of type 'v8f' (vector of 8 'float' values) without 'avx' enabled changes the ABI}}
+v8f def256(v8f x) {
+ return x;
+}
+
+// noavx512-warning at +2 {{AVX vector return of type 'v16f' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
+// noavx512-warning at +1 {{AVX vector argument of type 'v16f' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
+v16f def512(v16f x) {
+ return x;
+}
+
+__attribute__((target("avx")))
+v8f def256_avx(v8f x) {
+ return x;
+}
+
+__attribute__((target("avx512f")))
+v16f def512_avx512(v16f x) {
+ return x;
+}
diff --git a/libc/src/mathvec/generic/CMakeLists.txt b/libc/src/mathvec/generic/CMakeLists.txt
index d5d94d5ed56b5..0592ec1258cbf 100644
--- a/libc/src/mathvec/generic/CMakeLists.txt
+++ b/libc/src/mathvec/generic/CMakeLists.txt
@@ -7,6 +7,8 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.macros.properties.cpu_features
libc.src.__support.mathvec.expf
+ COMPILE_OPTIONS
+ -Wno-psabi
FLAGS
ROUND_OPT
FMA_OPT
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index d0bb38ab84df4..2c78a32b1449b 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -76,6 +76,9 @@
# We're not annotating all the APIs, since that's a lot of annotations compared to how many we actually care about
"-Wno-nullability-completeness",
+ # Adding this for now to get the build to pass but needs more detailed review
+ "-Wno-psabi",
+
# Technically not a warning flag, but might as well be:
"-flax-vector-conversions=none",
]
>From b7ff7d2f1bcfaa2dbfda0b3cb0c111395a12b1ff Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Thu, 21 May 2026 11:57:54 -0700
Subject: [PATCH 02/12] darker format
---
libcxx/utils/libcxx/test/params.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 2c78a32b1449b..c9e6f767679fa 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -75,7 +75,6 @@
# We're not annotating all the APIs, since that's a lot of annotations compared to how many we actually care about
"-Wno-nullability-completeness",
-
# Adding this for now to get the build to pass but needs more detailed review
"-Wno-psabi",
>From 7bca183e89c48af4ae6f7b6b04bb1fe3f4bf1dac Mon Sep 17 00:00:00 2001
From: freaknbigpanda <benjamin.luke at sony.com>
Date: Wed, 27 May 2026 17:10:57 -0700
Subject: [PATCH 03/12] Restricted warnings to externally visible definitions,
for internal definitions ABI mismatch will be diagnosed at the call site.
Added test to make sure we don't emit anything for internal definitions.
Improved the warning by returning valid source locations for functions that
don't have a valid FunctionTypeLoc, previously we were returning warnings
with no location. Added test to cover this case for lambda's with deduced
return type.
---
clang/lib/CodeGen/Targets/X86.cpp | 18 +++++++++++++++---
clang/test/CodeGenCXX/target-avx-abi-diag.cpp | 18 ++++++++++++++++++
libc/src/mathvec/generic/CMakeLists.txt | 2 --
libcxx/include/__algorithm/simd_utils.h | 6 ++++--
libcxx/utils/libcxx/test/params.py | 2 --
5 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index 37c643f14e39f..15bfe6fc1b681 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -1581,11 +1581,18 @@ void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
if (const TypeSourceInfo *TSI = FD->getTypeSourceInfo()) {
TypeLoc TL = TSI->getTypeLoc();
- if (auto FTL = TL.IgnoreParens().getAs<FunctionTypeLoc>())
- return FTL.getReturnLoc().getBeginLoc();
+ if (auto FTL = TL.IgnoreParens().getAs<FunctionTypeLoc>()) {
+ SourceLocation Loc = FTL.getReturnLoc().getBeginLoc();
+ if (Loc.isValid())
+ return Loc;
+ }
}
- return FD->getLocation();
+ SourceLocation Loc = FD->getLocation();
+ if (Loc.isValid())
+ return Loc;
+
+ return FD->getBeginLoc();
};
auto Check = [&](QualType Ty, SourceLocation Loc, bool IsReturn) {
@@ -1608,6 +1615,11 @@ void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
return false;
};
+ // psABI warnings & errors for function definitions that are only visible
+ // in this translation unit are handled at call site by checkFunctionCallABI
+ if (!FD->isExternallyVisible())
+ return;
+
// First check the return type and emit diagnostic if required
Check(FD->getReturnType(), GetReturnTypeLoc(FD), true);
diff --git a/clang/test/CodeGenCXX/target-avx-abi-diag.cpp b/clang/test/CodeGenCXX/target-avx-abi-diag.cpp
index 5048cb092e67f..66312d513058e 100644
--- a/clang/test/CodeGenCXX/target-avx-abi-diag.cpp
+++ b/clang/test/CodeGenCXX/target-avx-abi-diag.cpp
@@ -26,6 +26,11 @@ v16f def512(v16f x) {
return x;
}
+// Internal definitions do not warn
+static v8f internal_def256(v8f x) {
+ return x;
+}
+
__attribute__((target("avx")))
v8f def256_avx(v8f x) {
return x;
@@ -35,3 +40,16 @@ __attribute__((target("avx512f")))
v16f def512_avx512(v16f x) {
return x;
}
+
+// Check to make sure deduced return lambdas still have valid source location which allows these pragmas to work
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpsabi"
+template <class T>
+T template_lambda_return() {
+ return []() { return T{}; }();
+}
+
+v8f use_template_lambda_return() {
+ return template_lambda_return<v8f>();
+}
+#pragma clang diagnostic pop
diff --git a/libc/src/mathvec/generic/CMakeLists.txt b/libc/src/mathvec/generic/CMakeLists.txt
index 0592ec1258cbf..d5d94d5ed56b5 100644
--- a/libc/src/mathvec/generic/CMakeLists.txt
+++ b/libc/src/mathvec/generic/CMakeLists.txt
@@ -7,8 +7,6 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.macros.properties.cpu_features
libc.src.__support.mathvec.expf
- COMPILE_OPTIONS
- -Wno-psabi
FLAGS
ROUND_OPT
FMA_OPT
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h
index c47f79ac7f1dd..5b87f13e5bb01 100644
--- a/libcxx/include/__algorithm/simd_utils.h
+++ b/libcxx/include/__algorithm/simd_utils.h
@@ -90,6 +90,9 @@ inline constexpr size_t __native_vector_size = 1;
template <class _ArithmeticT, size_t _Np>
using __simd_vector __attribute__((__ext_vector_type__(_Np))) _LIBCPP_NODEBUG = _ArithmeticT;
+_LIBCPP_DIAGNOSTIC_PUSH
+_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wpsabi")
+
template <class _VecT>
inline constexpr size_t __simd_vector_size_v = []<bool _False = false>() -> size_t {
static_assert(_False, "Not a vector!");
@@ -115,8 +118,6 @@ template <class _VecT, class _Iter>
}
// Load the first _Np elements, zero the rest
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wpsabi")
template <class _VecT, size_t _Np, class _Iter>
[[__nodiscard__]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _VecT __partial_load(_Iter __iter) noexcept {
return [=]<size_t... _LoadIndices, size_t... _ZeroIndices>(
@@ -174,6 +175,7 @@ template <class _Tp, size_t _Np>
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_t __find_first_not_set(__simd_vector<_Tp, _Np> __vec) noexcept {
return std::__find_first_set(~__vec);
}
+_LIBCPP_DIAGNOSTIC_POP
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index c9e6f767679fa..d0bb38ab84df4 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -75,8 +75,6 @@
# We're not annotating all the APIs, since that's a lot of annotations compared to how many we actually care about
"-Wno-nullability-completeness",
- # Adding this for now to get the build to pass but needs more detailed review
- "-Wno-psabi",
# Technically not a warning flag, but might as well be:
"-flax-vector-conversions=none",
>From 157557bc6a28888461fec6e8bbc1b5e5d8b57732 Mon Sep 17 00:00:00 2001
From: freaknbigpanda <benjamin.luke at sony.com>
Date: Wed, 27 May 2026 18:12:38 -0700
Subject: [PATCH 04/12] fix test
---
clang/test/CodeGen/target-builtin-error-3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/CodeGen/target-builtin-error-3.c b/clang/test/CodeGen/target-builtin-error-3.c
index 840ca7534905d..75754f40ac44d 100644
--- a/clang/test/CodeGen/target-builtin-error-3.c
+++ b/clang/test/CodeGen/target-builtin-error-3.c
@@ -17,7 +17,7 @@ typedef __attribute__ ((ext_vector_type(16),__aligned__( 64))) float float16;
static inline half8 __attribute__((__overloadable__)) convert_half( float8 a ) {
return __extension__ ({ __m256 __a = (a); (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)__a, (0x00)); }); // expected-error {{'__builtin_ia32_vcvtps2ph256' needs target feature f16c}}
}
-// expected-warning at +1 {{AVX vector argument of type 'float16' (vector of 16 'float' values) without 'avx512f' enabled changes the ABI}}
+// Internal definitions do not warn.
static inline half16 __attribute__((__overloadable__)) convert_half( float16 a ) {
half16 r;
r.lo = convert_half(a.lo);
>From 2e9d22e0d9231061d9dc28f7690b49929386c379 Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Wed, 27 May 2026 18:15:16 -0700
Subject: [PATCH 05/12] clang format
---
clang/lib/CodeGen/Targets/X86.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index 15bfe6fc1b681..ce98a7d44540e 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -1615,7 +1615,7 @@ void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
return false;
};
- // psABI warnings & errors for function definitions that are only visible
+ // psABI warnings & errors for function definitions that are only visible
// in this translation unit are handled at call site by checkFunctionCallABI
if (!FD->isExternallyVisible())
return;
>From f314588a1bc9c79d0fc1affc3ed5744e554a27ee Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Thu, 25 Jun 2026 08:25:18 -0700
Subject: [PATCH 06/12] Update clang/lib/CodeGen/Targets/X86.cpp
Co-authored-by: Aaron Ballman <aaron at aaronballman.com>
---
clang/lib/CodeGen/Targets/X86.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index ce98a7d44540e..b2be5770ead6d 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -1616,7 +1616,7 @@ void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
};
// psABI warnings & errors for function definitions that are only visible
- // in this translation unit are handled at call site by checkFunctionCallABI
+ // in this translation unit are handled at call site by checkFunctionCallABI.
if (!FD->isExternallyVisible())
return;
>From 34d35433ac6e2f9eb6b256406b2d21d991e2c347 Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Thu, 25 Jun 2026 08:25:45 -0700
Subject: [PATCH 07/12] Update clang/lib/CodeGen/Targets/X86.cpp
Co-authored-by: Aaron Ballman <aaron at aaronballman.com>
---
clang/lib/CodeGen/Targets/X86.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index b2be5770ead6d..f5472319c9925 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -1620,7 +1620,7 @@ void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
if (!FD->isExternallyVisible())
return;
- // First check the return type and emit diagnostic if required
+ // First check the return type and emit diagnostic if required.
Check(FD->getReturnType(), GetReturnTypeLoc(FD), true);
// Go through the parameters and emit a warning for the first vector found
>From 65ccbb6975b9f25a69ef1bc1eafbe2e8eb2a6f53 Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Thu, 25 Jun 2026 08:25:55 -0700
Subject: [PATCH 08/12] Update clang/lib/CodeGen/Targets/X86.cpp
Co-authored-by: Aaron Ballman <aaron at aaronballman.com>
---
clang/lib/CodeGen/Targets/X86.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index f5472319c9925..807d372c3c8fd 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -1624,7 +1624,7 @@ void X86_64TargetCodeGenInfo::checkFunctionABI(CodeGenModule &CGM,
Check(FD->getReturnType(), GetReturnTypeLoc(FD), true);
// Go through the parameters and emit a warning for the first vector found
- // without the matching function AVX level attribute
+ // without the matching function AVX level attribute.
for (const ParmVarDecl *P : FD->parameters()) {
SourceLocation Loc = P->getLocation();
if (Loc.isInvalid())
>From d2c2dbf68151f46ef74c317958857a9cf6e57b73 Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Thu, 25 Jun 2026 08:37:57 -0700
Subject: [PATCH 09/12] Added release note
---
clang/docs/ReleaseNotes.rst | 915 ++++++++++++++++++++++++++++++++++++
1 file changed, 915 insertions(+)
create mode 100644 clang/docs/ReleaseNotes.rst
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
new file mode 100644
index 0000000000000..80b7880bdc85a
--- /dev/null
+++ b/clang/docs/ReleaseNotes.rst
@@ -0,0 +1,915 @@
+.. If you want to modify sections/contents permanently, you should modify both
+ ReleaseNotes.rst and ReleaseNotesTemplate.txt.
+
+===========================================
+Clang |release| |ReleaseNotesTitle|
+===========================================
+
+.. contents::
+ :local:
+ :depth: 2
+
+Written by the `LLVM Team <https://llvm.org/>`_
+
+.. only:: PreRelease
+
+ .. warning::
+ These are in-progress notes for the upcoming Clang |version| release.
+ Release notes for previous releases can be found on
+ `the Releases Page <https://llvm.org/releases/>`_.
+
+Introduction
+============
+
+This document contains the release notes for the Clang C/C++/Objective-C
+frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
+describe the status of Clang in some detail, including major
+improvements from the previous release and new feature work. For the
+general LLVM release notes, see `the LLVM
+documentation <https://llvm.org/docs/ReleaseNotes.html>`_. For the libc++ release notes,
+see `this page <https://libcxx.llvm.org/ReleaseNotes.html>`_. All LLVM releases
+may be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.
+
+For more information about Clang or LLVM, including information about the
+latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
+`LLVM Web Site <https://llvm.org>`_.
+
+Potentially Breaking Changes
+============================
+
+C/C++ Language Potentially Breaking Changes
+-------------------------------------------
+
+- Clang now makes it ill-formed to try to ``break`` out of or ``continue`` a loop inside its own condition,
+ increment, or init-statement in all C and C++ language modes. This means that code such as
+
+ .. code-block:: c++
+
+ while (({ break; })) {}
+
+ is now ill-formed. An outer loop can still be broken out of or continued so long as the inner loop is
+ in the body of the outer loop:
+
+ .. code-block:: c++
+
+ // Ok, this breaks out of the 'for' loop.
+ for (;;) {
+ while (({ break; true; })) {}
+ }
+
+ // Error: can't break out of the 'for' loop from within its own increment.
+ for (;;({ while (({ break; true; })) {} })) {}
+
+ This also resolves a divergence from GCC: in a construct such as
+
+ .. code-block:: c++
+
+ for (;;) {
+ while (({ break; true; })) {}
+ }
+
+ Clang would previously ``break`` out of the ``while`` loop, whereas GCC (since version 9) would
+ ``break`` out of the ``for`` loop here. Now, Clang and GCC both break out of the ``for`` loop.
+
+C++ Specific Potentially Breaking Changes
+-----------------------------------------
+
+- Clang now more aggressively optimizes away stores to objects after they are
+ dead. This behavior can be disabled with ``-fno-lifetime-dse``.
+
+- Clang now correctly rejects ``export`` declarations in module implementation
+ partitions. (#GH107602)
+
+- Template argument deduction now treats the ``N`` in ``_BitInt(N)``
+ as being of type ``std::size_t`` instead of ``int``,
+ matching the deduction of array sizes from ``int(&)[N]``.
+ This is a breaking change for code that depended on the previously deduced type. (#GH195033)
+
+- Clang now rejects nested local classes defined in a different
+ block scope than their parent class. (#GH193472)
+
+ABI Changes in This Version
+---------------------------
+
+- Fixed incorrect struct layout for ``_BitInt`` bitfields wider than 255 bits
+ on MSVC targets. Internal bitfield tracking fields were changed from
+ ``unsigned char`` to ``uint64_t`` to prevent overflow. This might be an ABI
+ break for such structs compared to earlier Clang versions.
+- Fixed a number of issues with the ``__regcall`` calling convention for passing
+ structs on non-Windows x86-64 targets, including a crash when handling empty
+ struct arguments. This changes how structs that contain arrays, floating point
+ types, or ``_Complex float`` types are passed, and may introduce
+ incompatibilities with code compiled by earlier versions of Clang that uses
+ the ``__regcall`` calling convention on these targets. (#GH62999) (#GH98635)
+- Fixed Itanium mangling for lambdas in instantiated non-static data member
+ initializers by preserving the field-name closure-prefix. This changes the
+ mangled names for affected lambdas. (#GH190555)
+
+AST Dumping Potentially Breaking Changes
+----------------------------------------
+
+- The JSON AST dump now includes all fields from ``AvailabilityAttr``: ``platform``,
+ ``introduced``, ``deprecated``, ``obsoleted``, ``unavailable``, ``message``,
+ ``strict``, ``replacement``, ``priority``, and ``environment``. Previously, these
+ fields were missing from the JSON output.
+- Colons that appear at the end of a ParamCommentCommand name are not serialized
+ as part of the name.
+
+Clang Frontend Potentially Breaking Changes
+-------------------------------------------
+
+- HIPSPV toolchain: `--offload-targets=spirv{32,64}` option is
+ deprecated and will be removed when the new offload driver becomes
+ default. The replacement for the option is
+ `--offload-targets=spirv{32,64}-unknown-chipstar` when using the new
+ offload driver (`--offload-new-driver`).
+- The new driver (`--offload-new-driver`) is now default for all offloading
+ compilations. This changes the ABI for relocatable device code. Currently,
+ libraries will need to be recompiled, or used with
+ (`--no-offload-new-driver`). This option will be removed in the next release.
+
+- Clang no longer defines the ``__cpp_impl_coroutine`` feature test macro under the 32-bit x86 Microsoft ABI,
+ as support for coroutines on this target is incomplete.
+ When using coroutines on this target a warning is emmitted to indicate the lack of full support.
+ That warning can be disabled with ``-Wno-coroutines-unsupported-target``. (see #GH59382)
+
+Clang Python Bindings Potentially Breaking Changes
+--------------------------------------------------
+- Remove ``CompletionString.Availability``. No libclang interfaces returned instances of it.
+- ``CompletionString.availability`` now returns instances of ``CompletionString.AvailabilityKindCompat``.
+
+ Instances of ``AvailabilityKindCompat`` have the same ``__str__`` representation
+ as the previous ``CompletionChunk.Kind`` and are equality-comparable with
+ the existing ``AvailabilityKind`` enum. It will be replaced by ``AvailabilityKind``
+ in a future release. When this happens, the return type of ``CompletionString.availability``
+ will change to ``AvailabilityKind``, so it is recommended to use ``AvailabilityKind``
+ to compare with the return values of ``CompletionString.availability``.
+- Remove ``availabilityKinds``. In this release, uses of ``availabilityKinds``
+ need to be replaced by ``CompletionString.AvailabilityKind``.
+- ``CompletionChunk.kind`` now returns instances of ``CompletionChunkKind``.
+
+ Instances of ``CompletionChunkKind`` have the same ``__str__`` representation
+ as the previous ``CompletionChunk.Kind`` for compatibility.
+ These representations will be changed in a future release to match other enums.
+- Remove ``completionChunkKindMap``. In this release, uses of ``completionChunkKindMap``
+ need to be replaced by ``CompletionChunkKind``.
+- Move ``SPELLING_CACHE`` into ``CompletionChunk`` and change it to use
+ ``CompletionChunkKind`` instances as keys, instead of the enum values.
+ An alias is kept in the form of a ``SPELLING_CACHE`` variable, but it only supports
+ ``__getitem__`` and ``__contains__``. It will be removed in a future release.
+ Please migrate to using ``CompletionChunk.SPELLING_CACHE`` instead.
+- ``SourceLocation`` and ``SourceRange`` now use ``NotImplemented`` to delegate
+ equality checks (``__eq__``) to the other object they are compared with when
+ they are of different classes. They previously returned ``False`` when compared
+ with objects of other classes.
+- ``TranslationUnit.get_tokens`` now throws an error if both the ``extent`` and
+ ``locations`` argument are passed. Previousy, ``locations`` took precedence.
+- ``_CXUnsavedFile`` will be renamed to ``UnsavedFile`` for consistency.
+ ``UnsavedFile`` is already available to use and existing uses should
+ be adapted to refer to it instead. ``_CXUnsavedFile`` will be removed in a
+ future release.
+
+OpenCL Potentially Breaking Changes
+-----------------------------------
+- Clang now diagnoses zero-length arrays as errors in OpenCL. OpenCL C 3.0
+ section 6.11.d states that "Variable length arrays and structures with
+ flexible (or unsized) arrays are not supported."
+
+What's New in Clang |release|?
+==============================
+
+C++ Language Changes
+--------------------
+
+- ``__is_trivially_equality_comparable`` no longer returns false for all enum types. (#GH132672)
+
+C++2c Feature Support
+^^^^^^^^^^^^^^^^^^^^^
+
+C++23 Feature Support
+^^^^^^^^^^^^^^^^^^^^^
+
+- Partially implement Itanium mangling for pack indexing. Partially substituted packs are not yet supported. (#GH112003)
+
+C++20 Feature Support
+^^^^^^^^^^^^^^^^^^^^^
+
+- Clang now supports `P1857R3 <https://wg21.link/p1857r3>`_ Modules Dependency Discovery. (#GH54047)
+
+C++17 Feature Support
+^^^^^^^^^^^^^^^^^^^^^
+
+Resolutions to C++ Defect Reports
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+- Implemented `CWG1780 Explicit instantiation/specialization of generic lambda
+ operator() <https://cplusplus.github.io/CWG/issues/1780.html>`_
+
+- Clang now allows omitting ``typename`` before a template name in a
+ conversion operator, implementing `CWG2413 <https://wg21.link/cwg2413>`_.
+
+- Clang now uses non-reference types for structured bindings whose initializer
+ returns a prvalue. This resolves `CWG3135 <https://wg21.link/cwg3135>`_.
+
+C Language Changes
+------------------
+
+C2y Feature Support
+^^^^^^^^^^^^^^^^^^^
+
+- Implemented the type-specific C2y ``<stdbit.h>`` rotate functions with constexpr
+ evaluation support:
+ ``stdc_rotate_left_{uc,us,ui,ul,ull}`` and
+ ``stdc_rotate_right_{uc,us,ui,ul,ull}``.
+
+C23 Feature Support
+^^^^^^^^^^^^^^^^^^^
+- Clang now allows C23 ``constexpr`` struct member access through the dot operator in constant expressions. (#GH178349)
+
+Objective-C Language Changes
+-----------------------------
+
+- Clang now emits Objective-C number, array, and dictionary literals as
+ compile-time constant data structures rather than runtime ``objc_msgSend``
+ calls on targets whose runtime supports constant literal classes. The
+ feature can be disabled altogether with ``-fno-objc-constant-literals``,
+ or selectively per literal kind with ``-fno-constant-nsnumber-literals``,
+ ``-fno-constant-nsarray-literals``, and
+ ``-fno-constant-nsdictionary-literals``.
+
+Non-comprehensive list of changes in this release
+-------------------------------------------------
+
+- Added support for floating point and pointer values in most ``__atomic_``
+ builtins.
+
+- Added ``__builtin_stdc_rotate_left`` and ``__builtin_stdc_rotate_right``
+ for bit rotation of unsigned integers including ``_BitInt`` types. Rotation
+ counts are normalized modulo the bit-width and support negative values.
+ Usable in constant expressions. Implicit conversion is supported for
+ class/struct types with conversion operators.
+- Implemented the following C23 ``<stdbit.h>`` builtins with ``_BitInt``
+ support and constexpr evaluation:
+ ``__builtin_stdc_leading_zeros``, ``__builtin_stdc_leading_ones``,
+ ``__builtin_stdc_trailing_zeros``, ``__builtin_stdc_trailing_ones``,
+ ``__builtin_stdc_first_leading_zero``, ``__builtin_stdc_first_leading_one``,
+ ``__builtin_stdc_first_trailing_zero``, ``__builtin_stdc_first_trailing_one``,
+ ``__builtin_stdc_count_zeros``, ``__builtin_stdc_count_ones``,
+ ``__builtin_stdc_has_single_bit``, ``__builtin_stdc_bit_width``,
+ ``__builtin_stdc_bit_floor``, and ``__builtin_stdc_bit_ceil``.
+
+- Implemented the type-specific C23 ``<stdbit.h>`` functions with constexpr
+ evaluation support:
+ ``stdc_leading_zeros_{uc,us,ui,ul,ull}``,
+ ``stdc_leading_ones_{uc,us,ui,ul,ull}``,
+ ``stdc_trailing_zeros_{uc,us,ui,ul,ull}``,
+ ``stdc_trailing_ones_{uc,us,ui,ul,ull}``,
+ ``stdc_first_leading_zero_{uc,us,ui,ul,ull}``,
+ ``stdc_first_leading_one_{uc,us,ui,ul,ull}``,
+ ``stdc_first_trailing_zero_{uc,us,ui,ul,ull}``,
+ ``stdc_first_trailing_one_{uc,us,ui,ul,ull}``,
+ ``stdc_count_zeros_{uc,us,ui,ul,ull}``,
+ ``stdc_count_ones_{uc,us,ui,ul,ull}``,
+ ``stdc_has_single_bit_{uc,us,ui,ul,ull}``,
+ ``stdc_bit_width_{uc,us,ui,ul,ull}``,
+ ``stdc_bit_floor_{uc,us,ui,ul,ull}``, and
+ ``stdc_bit_ceil_{uc,us,ui,ul,ull}``.
+
+- A new generic bit-reverse builtin function ``__builtin_bitreverseg`` that
+ extends bit-reversal support to all standard integers type, including
+ ``_BitInt``
+
+- Deprecated float types support from ``__builtin_elementwise_max`` and
+ ``__builtin_elementwise_min``.
+
+- Added header ``endian.h`` which contains byte order helpers specified in POSIX
+
+- Added #pragma loop licm(disable) for llvm.loop.licm.disable metadata
+
+- Added a new ``ExplicitInstantiationDecl`` AST node to represent explicit
+ template instantiations (e.g., ``template void foo<int>();`` or
+ ``extern template class S<int>;``). Previously, source location information
+ for explicit instantiation statements was discarded after parsing. The new
+ node preserves the full source range including the ``extern`` and ``template``
+ keywords, qualifiers, template arguments as written, and the declared type,
+ enabling tools such as language servers and refactoring engines to accurately
+ map source locations back to explicit instantiation sites.
+
+- ``typeid`` on references and pointers of ``final`` types no longer emits a
+ vtable lookup at runtime.
+
+- Updated support for Unicode from 15.1 to 18.0.
+
+New Compiler Flags
+------------------
+- New option ``-fms-anonymous-structs`` / ``-fno-ms-anonymous-structs`` added
+ to enable or disable Microsoft's anonymous struct/union extension without
+ enabling other ``-fms-extensions`` features (#GH177607).
+- New option ``--precompile-reduced-bmi`` allows build system to generate a
+ reduced BMI only for a C++20 importable module unit. Previously the users
+ can only generate the reduced BMI as a by-product, e.g, an object files or
+ a full BMI.
+
+- New ``-cc1`` option ``-fexperimental-overflow-behavior-types`` added to
+ enable parsing of the experimental ``overflow_behavior`` type attribute and
+ type specifiers.
+
+- New ``-cl`` option ``/d2guardnochecks`` added to match MSVC. When Windows
+ Control Flow Guard (CFG) is enabled by other options, it will instruct Clang
+ to emit the CFG metadata, but disable adding checks.
+
+- New option ``-fdiagnostics-show-inlining-chain`` added to show inlining chain
+ notes for ``[[gnu::warning]]`` and ``[[gnu::error]]`` diagnostics. When a
+ function with these attributes is called from an inlined context, Clang can
+ now show which functions were inlined to reach the call. When debug info is
+ available (``-gline-directives-only`` (implicitly enabled at ``-g1``) or
+ higher), accurate source locations are used; otherwise, a heuristic fallback
+ is used with a note suggesting how to enable debug info for better accuracy.
+
+- New option ``-fwin-cfg-mechanism=`` added to control the mechanism used by
+ Control Flow Guard on Windows. Accepted values are ``automatic`` (default),
+ ``dispatch``, and ``check``. The ``dispatch`` mechanism uses the dispatch
+ function to perform indirect call checks and can improve performance, while
+ ``check`` uses the traditional check mechanism.
+- New ``-cl`` option ``/d2guardcfgdispatch`` added to match MSVC. This acts as a
+ shorthand for ``-fwin-cfg-mechanism=dispatch``.
+- New ``-cl`` option ``/d2guardcfgdispatch-`` added to match MSVC. This acts as a
+ shorthand for ``-fwin-cfg-mechanism=check``.
+
+- New option ``-f[no-]strict-bool`` added to control whether Clang can assume
+ that ``bool`` values loaded from memory cannot have a bit pattern other
+ than 0 or 1.
+
+Deprecated Compiler Flags
+-------------------------
+
+Modified Compiler Flags
+-----------------------
+- The `-mno-outline` and `-moutline` compiler flags are now allowed on RISC-V and X86, which both support the machine outliner.
+- The `-mno-outline` flag will now add the `nooutline` IR attribute, so that
+ `-mno-outline` and `-moutline` objects can be mixed correctly during LTO.
+
+Removed Compiler Flags
+----------------------
+
+Attribute Changes in Clang
+--------------------------
+
+- Added new attribute ``stack_protector_ignore`` to opt specific local variables out of
+ the analysis which determines if a function should get a stack protector. A function
+ will still generate a stack protector if other local variables or command line flags
+ require it.
+
+- Added a new attribute, ``[[clang::no_outline]]`` to suppress outlining from
+ annotated functions. This uses the LLVM `nooutline` attribute.
+
+- Introduced a new type attribute ``__attribute__((overflow_behavior))`` which
+ currently accepts either ``wrap`` or ``trap`` as an argument, enabling
+ type-level control over overflow behavior. There is also an accompanying type
+ specifier for each behavior kind via `__ob_wrap` and `__ob_trap`.
+
+- Introduced a new function attribute ``__attribute__((__personality__(...)))``
+ to explicitly specify the personality routine for exception handling. THis is
+ meant to be a low level tool for language runtime authors to associate a
+ foreign language personality with a given function. Note that this does not
+ perform any ABI validation for the personality routine.
+
+- :doc:`ThreadSafetyAnalysis` attributes now correctly handle implicit member
+ accesses in C, and parameter attributes in C++. This improves diagnostic
+ precision and fixes false positives.
+
+- The :doc:`ThreadSafetyAnalysis` attributes ``guarded_by`` and
+ ``pt_guarded_by`` now accept multiple capability arguments with refined
+ access semantics: *writing* requires all listed capabilities to be held
+ exclusively, while *reading* requires at least one to be held. This is
+ sound because any writer must hold all capabilities, so holding any one
+ prevents concurrent writes.
+
+- :doc:`ThreadSafetyAnalysis` attributes like ``acquire_capability``,
+ ``release_capability``, ``requires_capability``, ``locks_excluded``,
+ ``try_acquire_capability``, and ``assert_capability`` can now be applied to
+ function pointer variables and fields. The analysis checks calls through
+ annotated function pointers the same way it checks direct function calls.
+ Only plain function pointers are supported; pointers-to-member functions,
+ blocks, or wrappers (e.g. ``std::function``) are not yet supported.
+
+- The ``[[clang::unsafe_buffer_usage]]`` attribute is now supported in API
+ notes. For example:
+
+ .. code-block:: yaml
+
+ Functions:
+ - Name: myUnsafeFunction
+ UnsafeBufferUsage: true
+
+- Added support for ``[[msvc::forceinline]]`` for functions and
+ ``[[msvc::forceinline_calls]]`` for statements. Both are aliases to
+ ``[[clang::always_inline]]`` with additional checks to ensure that they
+ are only accepted in places where MSVC also does.
+
+- The AMDGPU ``amdgpu_num_sgpr`` and ``amdgpu_num_vgpr`` attributes are now
+ deprecated. Clang emits a ``-Wdeprecated-declarations`` warning when they
+ are used. Use ``amdgpu_waves_per_eu`` instead to control SGPR and VGPR
+ usage.
+
+- Clang now allows GNU attributes between a member declarator and bit-field width. (#GH184954)
+
+Improvements to Clang's diagnostics
+-----------------------------------
+- Fixed bug in ``-Wdocumentation`` so that it correctly handles explicit
+ function template instantiations (#64087).
+
+- ``-Wunused-but-set-variable`` now diagnoses file-scope variables with
+ internal linkage (``static`` storage class) that are assigned but never used.
+ This new coverage is added under the subgroup ``-Wunused-but-set-global``,
+ allowing it to be disabled independently with ``-Wno-unused-but-set-global``.
+ (#GH148361)
+
+- Added ``-Wlifetime-safety`` to enable lifetime safety analysis,
+ a CFG-based intra-procedural analysis that detects use-after-free and related
+ temporal safety bugs. See the
+ `RFC <https://discourse.llvm.org/t/rfc-intra-procedural-lifetime-analysis-in-clang/86291>`_
+ for more details. By design, this warning is enabled in ``-Weverything``. To disable
+ the analysis, use ``-Wno-lifetime-safety`` or ``-fno-lifetime-safety``.
+
+- Added ``-Wlifetime-safety-suggestions`` to enable lifetime annotation suggestions.
+ This provides suggestions for function parameters that
+ should be marked ``[[clang::lifetimebound]]`` based on lifetime analysis. For
+ example, for the following function:
+
+ .. code-block:: c++
+
+ int* p(int *in) { return in; }
+
+ Clang will suggest:
+
+ .. code-block:: c++
+
+ warning: parameter in intra-TU function should be marked [[clang::lifetimebound]]
+ int* p(int *in) { return in; }
+ ^~~~~~~
+ [[clang::lifetimebound]]
+ note: param returned here
+ int* p(int *in) { return in; }
+ ^~
+
+- Added ``-Wlifetime-safety-noescape`` to detect misuse of ``[[clang::noescape]]``
+ annotation where the parameter escapes through return. For example:
+
+ .. code-block:: c++
+
+ int* p(int *in [[clang::noescape]]) { return in; }
+
+ Clang will warn:
+
+ .. code-block:: c++
+
+ warning: parameter is marked [[clang::noescape]] but escapes
+ int* p(int *in [[clang::noescape]]) { return in; }
+ ^~~~~~~
+ note: returned here
+ int* p(int *in [[clang::noescape]]) { return in; }
+ ^~
+
+- Added ``-Wlifetime-safety-dangling-field`` to detect dangling field references
+ when stack memory escapes to class fields. This is part of ``-Wlifetime-safety``
+ and detects cases where local variables or parameters are stored in fields but
+ outlive their scope. For example:
+
+ .. code-block:: c++
+
+ struct DanglingView {
+ std::string_view view;
+ DanglingView(std::string s) : view(s) {} // warning: address of stack memory escapes to a field
+ };
+
+- Improved ``-Wassign-enum`` performance by caching enum enumerator values. (#GH176454)
+
+- Clang now emits ``-Wpsabi`` diagnostics for externally visible x86-64
+ function definitions that return or take AVX or AVX-512 vector types without
+ enabling the corresponding target feature.
+
+- Fixed a false negative in ``-Warray-bounds`` where the warning was suppressed
+ when accessing a member function on a past-the-end array element.
+ (#GH179128)
+
+- Added a missing space to the FixIt for the ``implicit-int`` group of diagnostics and
+ made sure that only one such diagnostic and FixIt is emitted per declaration group. (#GH179354)
+
+- Fixed the Fix-It insertion point for ``expected ';' after alias declaration``
+ when parsing alias declarations involving a token-split ``>>`` sequence
+ (for example, ``using A = X<int>>;``). (#GH184425)
+
+- Fixed incorrect ``implicitly deleted`` diagnostic for explicitly deleted
+ candidate function. (#GH185693)
+
+- The ``-Wloop-analysis`` warning has been extended to catch more cases of
+ variable modification inside lambda expressions (#GH132038).
+
+- Clang now emits ``-Wsizeof-pointer-memaccess`` when snprintf/vsnprintf use the sizeof
+ the destination buffer(dynamically allocated) in the len parameter(#GH162366)
+
+- Added ``-Wmodule-map-path-outside-directory`` (off by default) to warn on
+ header and umbrella directory paths that use ``..`` to refer outside the module
+ directory in module maps found via implicit search
+ (``-fimplicit-module-maps``). This does not affect module maps specified
+ explicitly via ``-fmodule-map-file=``.
+
+- Honour ``[[maybe_unused]]`` attribute on private fields.
+ ``-Wunused-private-field`` no longer emits a warning for annotated private
+ fields.
+
+- Improved ``-Wgnu-zero-variadic-macro-arguments`` to suggest using
+ ``__VA_OPT__`` if the current language version supports it(#GH188624)
+
+- Clang now emits an error when implicitly casting a complex type to a built-in vector type. (#GH186805)
+
+- Added ``-Wnonportable-include-path-separator`` (off by default) to catch
+ #include directives that use backslashes as a path separator. The warning
+ includes a FixIt to change all the backslashes to forward slashes, so that the
+ code can automatically be made portable to other host platforms that don't
+ support backslashes.
+
+- Clang now explains why template deduction fails for explicit template arguments.
+
+- No longer emitting a ``-Wpre-c2y-compat`` or extension diagnostic about use
+ of octal literals with a ``0o`` prefix, and no longer emitting a
+ ``-Wdeprecated-octal-literals`` diagnostic for use of octal literals without
+ a ``0o`` prefix, when the literal is expanded from a macro defined in a
+ system header. (#GH192389)
+
+- Improved error recovery for missing semicolons after class members. Clang now avoids
+ skipping subsequent valid declarations when their previous decl is missing semicolon.
+
+- Removed the body of lambdas from some diagnostic messages.
+
+- Fixed false positive host-device mismatch errors in discarded `if constexpr` branches for CUDA/HIP;
+ such calls are now correctly skipped.
+
+- Clang now errors when a function declaration aliases a variable or vice versa. (#GH195550)
+
+- Added ``-Wattribute-alias`` to diagnose type mismatches between an alias and its aliased function. (#GH195550)
+
+- The diagnostics around ``__block`` now explain why a variable cannot be marked ``__block``. (#GH197213)
+
+- Extended ``-Wnonportable-include-path`` to warn about trailing whitespace and dots in ``#include`` paths. (#GH190610)
+
+- Clang now emits error when attribute is missing closing ``]]`` followed by ``;;``. (#GH187223)
+
+Improvements to Clang's time-trace
+----------------------------------
+
+Improvements to Coverage Mapping
+--------------------------------
+
+- [MC/DC] Nested expressions are handled as individual MC/DC expressions.
+- "Single byte coverage" now supports branch coverage and can be used
+ together with ``-fcoverage-mcdc``.
+- Consteval member functions are no longer emitted in coverage mappings,
+ matching the existing behavior for free consteval functions. (#GH164448)
+
+Bug Fixes in This Version
+-------------------------
+
+- Fixed atomic boolean compound assignment; the conversion back to atomic bool would be miscompiled. (#GH33210)
+- Correctly handle default template argument when establishing subsumption. (#GH188640)
+- Fixed a failed assertion in the preprocessor when ``__has_embed`` parameters are missing parentheses. (#GH175088)
+- Fix lifetime extension of temporaries in for-range-initializers in templates. (#GH165182)
+- Fixed a preprocessor crash in ``__has_cpp_attribute`` on incomplete scoped attributes. (#GH178098)
+- Fixes an assertion failure when evaluating ``__underlying_type`` on enum redeclarations. (#GH177943)
+- Fixed an assertion failure caused by nested macro expansion during header-name lexing (``__has_embed(__has_include)``). (#GH178635)
+- Clang now outputs relative paths of embeds for dependency output. (#GH161950)
+- Fix the result type of a binary operation where both operands are 'void' l-values. (#GH111300)
+- Fixed an assertion failure when evaluating ``_Countof`` on invalid ``void``-typed operands. (#GH180893)
+- Fixed an assertion failure in the serialized diagnostic printer when it is destroyed without calling ``finish()``. (#GH140433)
+- Fixed an assertion failure caused by error recovery while extending a nested name specifier with results from ordinary lookup. (#GH181470)
+- Fixed a crash when parsing ``#pragma clang attribute`` arguments for attributes that forbid arguments. (#GH182122)
+- Fixed a bug with multiple-include optimization (MIOpt) state not being preserved in some cases during lexing, which could suppress header-guard mismatch diagnostics and interfere with include-guard optimization. (#GH180155)
+- Fixed a crash when normalizing constraints involving concept template parameters whose index coincided with non-concept template parameters in the same parameter mapping.
+- Fixed a crash caused by accessing dependent diagnostics of a non-dependent context.
+- Fixed a crash when substituting into a non-type template parameter that has a type containing an undeduced placeholder type.
+- Fixed several crashes and improved diagnostics when a multidimensional subscript operator is applied to a built-in type. (#GH187800)
+- Correctly diagnosing and no longer crashing when ``export module foo``
+ (without a semicolon) are the final tokens in a module file. (#GH187771)
+- Fixed a crash in duplicate attribute checking caused by comparing constant arguments with different integer signedness. (#GH188259)
+- Clang now emits an error when returning an initializer list from a lambda
+ with an explicit return type of void. The diagnostic now correctly refers
+ to "lambda" instead of "block". (#GH188661)
+- Fixed a crash on _BitInt(N) arrays where 129 ≤ N ≤ 192 due to incorrect array filler lowering. (#GH189643)
+- Fixed the behavior in C23 of ``auto``, by emitting an error when an array type is specified for a ``char *``. (#GH162694)
+- Fixed an issue where an assert was thrown instead of an error if no vulkan env was specified with ``--triple spirv``. (#GH189964)
+- Fixed incorrect rejection of ``auto`` with reordered declaration specifiers in C23. (#GH164121)
+- Fixed a crash where constexpr evaluation encountered invalid overrides. (#GH183290)
+- Fixed a bug where Clang fails to find instantiation of Decls in constraint checking. (#GH173086)
+- Fixed a crash when assigning to an element of an ``ext_vector_type`` with ``bool`` element type. (#GH189260)
+- Fixed a crash caused by declaring multiple ``ownership_returns`` attributes with mismatched or missing arguments. (#GH188733)
+- Clang now emits an error for friend declarations of lambda members. (#GH26540)
+- Fixed a crash caused by lambda capture handling in delayed default arguments. (#GH176534)
+- Fixed a crash when parsing invalid ``static_assert`` declarations with string-literal messages (#GH187690).
+- Fixed a potential stack-use-after-return issue in Clang when copy-initializing
+ an array via an element-at-a-time copy loop (#GH192026)
+- Fixed an issue where certain designated initializers would be rejected for constexpr variables. (#GH193373)
+- Fixed a crash when ``#embed`` is used with C++ modules (#GH195350)
+
+Bug Fixes to Compiler Builtins
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+- Fix a crash when passing an unresolved overload set to ``__builtin_classify_type``. (#GH175589)
+- Fixed a crash when calling `__builtin_allow_sanitize_check` with no arguments. (#GH183927)
+- ``__annotation`` is now diagnosed as unsupported on non-Windows/UEFI targets, fixing a
+ crash when using it with ``-fms-extensions`` on other platforms. (#GH184318)
+
+Bug Fixes to Attribute Support
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+- Fixed a behavioral discrepancy between deleted functions and private members when checking the ``enable_if`` attribute. (#GH175895)
+- Fixed ``init_priority`` attribute by delaying type checks until after the type is deduced.
+
+Bug Fixes to C++ Support
+^^^^^^^^^^^^^^^^^^^^^^^^
+- Fixed a preprocessor assertion failure triggered when parsing an invalid template-id starting with ``::template operator``. (#GH186582)
+- Fixed a crash when a function template is defined as a non-template friend with a global scope qualifier. (#GH185341)
+- Clang now rejects constant template parameters with block pointer types, since these are not implemented anyway and would lead to crashes. (#GH189247)
+- Fixed a crash on error recovery when dealing with invalid templates. (#GH183075)
+- Fixed a crash when instantiating ``requires`` expressions involving substitution failures in C++ concepts. (#GH176402)
+- Concepts appearing in the require-clause of a member function no longer have access to non-public members of that class,
+ or to a current class object. (#GH115838) (#GH194803) (#GH197067)
+- We no longer caches invalid variable specializations. (#GH132592)
+- Fixed an incorrect template argument deduction when matching packs of template
+ template parameters when one of its parameters is also a pack. (#GH181166)
+- Clang no longer errors on overloads with different ref-qualifiers and constraints. (#GH120812)
+- Fixed a crash when a default argument is passed to an explicit object parameter. (#GH176639)
+- Fixed an alias template CTAD crash.
+- Correctly diagnose uses of ``co_await`` / ``co_yield`` in the default argument of nested function declarations. (#GH98923)
+- Fixed a crash when diagnosing an invalid static member function with an explicit object parameter (#GH177741)
+- Clang incorrectly instantiated variable specializations outside of the immediate context. (#GH54439)
+- Fixed a crash when pack expansions are used as arguments for non-pack parameters of built-in templates. (#GH180307)
+- Fix a problem where a substitution failure when evaluating a type requirement
+ could directly make the program ill-formed.
+- Fix a problem where pack index expressions where incorrectly being regarded as equivalent.
+- Fixed a bug where captured variables in non-mutable lambdas were incorrectly treated as mutable
+ when used inside decltype in the return type. (#GH180460)
+- Fixed a crash when evaluating uninitialized GCC vector/ext_vector_type vectors in ``constexpr``. (#GH180044)
+- Fixed a crash when `explicit(bool)` is used with an incomplete enumeration. (#GH183887)
+- Fixed a crash on ``typeid`` of incomplete local types during template instantiation. (#GH63242), (#GH176397)
+- Fixed spurious diagnostics produced when checking if constraints are equivalent for redeclarations,
+ which could make the program mistakenly ill-formed.
+- Fixed a crash when an immediate-invoked ``consteval`` lambda is used as an invalid initializer. (#GH185270)
+- Fixed an assertion failure when using a global destructor with a target with a non-default program address space. (#GH186484)
+- Fixed a crash when instantiating an invalid out-of-line static data member definition in a local class. (#GH176152)
+- Inherited constructors in ``dllexport`` classes are now exported for ABI-compatible cases, matching
+ MSVC behavior. Constructors with variadic arguments or callee-cleanup parameters are not yet supported
+ and produce a warning. (#GH162640)
+- Correctly diagnose invalid non-dependent calls in dependent contexts. (#GH135694)
+- Fix initialization of GRO when GRO-return type mismatches, as part of CWG2563. (#GH98744)
+- Fix an error using an initializer list with array new for a type that is not default-constructible. (#GH81157)
+- We no longer consider conversion operators when copy-initializing from the same type. This was non
+ conforming and could lead to recursive constraint satisfaction checking. (#GH149443)
+- Fixed a crash in Itanium C++ name mangling for a lambda in a local class field initializer inside a constructor/destructor. (#GH176395)
+- Fixed crashes in Itanium C++ name mangling for lambdas with trailing requires-clauses involving requires-expressions. (#GH100774) (#GH123854)
+- Fixed an invalid rejection and assertion failure while generating ``operator=`` for fields with the ``__restrict`` qualifier. (#GH37979)
+- Fixed a use-after-free bug when parsing default arguments containing lambdas in declarations with template-id declarators. (#GH196725)
+- Fixed a crash in constant evaluation using placement new on an array which was later initialized. (#GH196450)
+- Fixed an issue where Clang incorrectly accepted invalid unqualified uses of local nested class names outside their declaring scope. (#GH184622)
+
+Bug Fixes to AST Handling
+^^^^^^^^^^^^^^^^^^^^^^^^^
+- Fixed a bug where explicit nullability property attributes were not stored in AST nodes in Objective-C. (#GH179703)
+- Fixed a bug where alias CTAD, or an invalid template template parameter, could create a template with an empty template
+ parameter list. This also adds asserts to prevent this from happening again.
+- Fixed a crash when parsing Doxygen ``@param`` commands attached to invalid declarations or non-function entities. (#GH182737)
+- Fixed the SourceLocation and SourceRange of reversed rewritten CXXOperatorCallExpr. (#GH192467)
+- Fixed a assertion when ``__block`` is used on global variables in C mode. (#GH183974)
+
+Miscellaneous Bug Fixes
+^^^^^^^^^^^^^^^^^^^^^^^
+- Fixed the arguments of the format attribute on ``__builtin_os_log_format``. Previously, they were off by 1.
+
+Miscellaneous Clang Crashes Fixed
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed a crash when attempting to jump over initialization of a variable with variably modified type. (#GH175540)
+- Fixed a crash when using loop hint with a value dependent argument inside a
+ generic lambda. (#GH172289)
+- Fixed a crash in C++ overload resolution with ``_Atomic``-qualified argument types. (#GH170433)
+- Fixed a crash related to missing source locations (#GH186655)
+- Fixed a crash when casting a parenthesized unresolved template-id or array section. (#GH183505)
+- Fixed a crash when initializing a ``constexpr`` pointer with a floating-point literal in C23. (#GH180313)
+- Fixed a lack of diagnostic for substitution failures in base classes when using `std::void_t`-like types.
+- Fixed a crash when emitting debug info for base classes with instantiation-dependent-only types (#GH193932)
+- Fixed an assertion when diagnosing address-space qualified ``new``/``delete`` in language-defined address spaces such as OpenCL ``__local``. (#GH178319)
+- Fixed an assertion failure in ObjC++ ARC when binding a rvalue reference to reference with different lifetimes (#GH178524)
+- Fixed a crash when subscripting a vector type with large unsigned integer values. (#GH180563)
+- Fixed a crash when attempting to diagnose incompatible conversions involving function types (#GH182534)
+- Fixed a crash when evaluating ``__is_bitwise_cloneable`` on invalid record types. (#GH183707)
+- Fixed an assertion failure when casting a function pointer with a target with a non-default program address space. (#GH186210)
+- Fixed a crash when ``decltype(__builtin_FUNCTION())`` is used as a template type argument. (#GH167433)
+- Fixed an assertion failure when parsing an invalid ``decltype`` specifier with missing parentheses or extra semicolons. (#GH188014)
+- Fixed a crash when explicitly casting a complex type to or from an atomic complex type. (#GH172208)
+- Fixed a crash when explicitly casting a scalar to an atomic complex. (#GH114885)
+- Fixed an assertion failure when parsing an invalid out-of-line enum definition with template parameters. (#GH187909)
+- Fixed an assertion failure on invalid template template parameter during typo correction. (#GH183983)
+- Fixed an assertion failure in ``isAtEndOfMacroExpansion`` on macro expansions crossing the boundary of two fileIDs. (#GH115007), (#GH21755)
+
+OpenACC Specific Changes
+------------------------
+
+Target Specific Changes
+-----------------------
+
+AMDGPU Support
+^^^^^^^^^^^^^^
+- Introduced a new target specific builtin ``__builtin_amdgcn_processor_is``,
+ a late / deferred query for the current target processor.
+- Introduced a new target specific builtin ``__builtin_amdgcn_is_invocable``,
+ a late / deferred query for the availability of target specific builtins.
+- Initial support for gfx1310
+- The ``amdgpu_num_sgpr`` and ``amdgpu_num_vgpr`` function attributes are now
+ deprecated. Using them produces a ``-Wdeprecated-declarations`` warning. Use
+ ``amdgpu_waves_per_eu`` instead.
+
+NVPTX Support
+^^^^^^^^^^^^^^
+
+X86 Support
+^^^^^^^^^^^
+- ``march=znver6`` is now supported.
+
+Arm and AArch64 Support
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Android Support
+^^^^^^^^^^^^^^^
+
+Windows Support
+^^^^^^^^^^^^^^^
+
+- Clang now defines the ``_MSVC_TRADITIONAL`` macro as ``1`` when emulating MSVC
+ 19.15 (Visual Studio 2017 version 15.8) and later. (#GH47114)
+- ``-fmacro-prefix-map=`` (``-ffile-prefix-map=``) now affects an anonymous namespace hash generation
+ for the MSVC targets and allows deterministic symbol mangling for reproducible builds.
+
+LoongArch Support
+^^^^^^^^^^^^^^^^^
+
+- DWARF fission is now compatible with linker relaxations, allowing `-gsplit-dwarf` and `-mrelax`
+ to be used together when building for the LoongArch platform.
+
+RISC-V Support
+^^^^^^^^^^^^^^
+
+- Tenstorrent Ascalon D8 was renamed to Ascalon X. Use `tt-ascalon-x` with `-mcpu` or `-mtune`.
+- Intrinsics were added for the 'Zvabd` (RISC-V Integer Vector Absolute Difference) extension.
+- Intrinsics were added for the 'Zvzip` (Reordering Structured Data in Vector Registers) extension.
+
+CUDA/HIP Language Changes
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- The new offloading driver is now the default for HIP. Use
+ `--no-oflfoad-new-driver` to return to the old behavior.
+
+CUDA Support
+^^^^^^^^^^^^
+
+AIX Support
+^^^^^^^^^^^
+
+- The driver default for the linker flag `-bcdtors` now defaults to `mbr`
+ (instead of `all`) which only extracts static init from archive members which
+ would otherwise be referenced.
+ (See https://www.ibm.com/docs/en/aix/7.2.0?topic=l-ld-command for details).
+
+NetBSD Support
+^^^^^^^^^^^^^^
+
+WebAssembly Support
+^^^^^^^^^^^^^^^^^^^
+
+- Fixed a crash when ``__funcref`` is applied to a non-function pointer type.
+ (#GH118233)
+
+AVR Support
+^^^^^^^^^^^
+
+SystemZ Support
+^^^^^^^^^^^^^^^
+
+- Add support for `#pragma export` for z/OS. This is a pragma used to export functions and variables
+ with external linkage from shared libraries. It provides compatibility with the IBM XL C/C++
+ compiler.
+
+DWARF Support in Clang
+----------------------
+
+Floating Point Support in Clang
+-------------------------------
+
+Fixed Point Support in Clang
+----------------------------
+
+AST Matchers
+------------
+- Add ``functionTypeLoc`` matcher for matching ``FunctionTypeLoc``.
+- Add missing support for ``TraversalKind`` in some ``addMatcher()`` overloads.
+
+clang-format
+------------
+- Add ``ObjCSpaceAfterMethodDeclarationPrefix`` option to control space between the
+ '-'/'+' and the return type in Objective-C method declarations
+- Deprecate the ``BinPackParameters`` and ``BinPackArguments`` options and replace
+ them with the ``PackParameters`` and ``PackArguments`` structs (respectively) to
+ unify packing behavior. Add the ``BreakAfter`` option to the structs, allowing
+ parameter and argument lists to be formatted with one parameter/argument on each
+ line if they exceed the specified count.
+- Add ``AfterComma`` value to ``BreakConstructorInitializers`` to allow breaking
+ constructor initializers after commas, keeping the colon on the same line.
+- Extend ``BreakBinaryOperations`` to accept a structured configuration with
+ per-operator break rules and minimum chain length gating via ``PerOperator``.
+- Add ``AllowShortRecordOnASingleLine`` option and set it to ``EmptyAndAttached`` for LLVM style.
+- Add ``BreakFunctionDeclarationParameters`` option to always break before function
+ declaration parameters.
+- Add ``EnumAssignments`` option to ``AlignConsecutiveAssignments`` for aligning
+ enum assignments without affecting other assignments.
+- Add ``BreakBeforeReturnType`` option to break before the function return
+ type.
+
+libclang
+--------
+- Visit constraints of `auto` type to properly visit concept usages (#GH166580)
+- Visit switch initializer statements (https://bugs.kde.org/show_bug.cgi?id=415537#c2)
+- Fix crash in clang_getBinaryOperatorKindSpelling and clang_getUnaryOperatorKindSpelling
+- The clang_Module_getASTFile API is deprecated and now always returns nullptr
+
+Code Completion
+---------------
+
+- Fixed a crash in code completion when using a C-Style cast with a parenthesized
+ operand in Objective-C++ mode. (#GH180125)
+
+Static Analyzer
+---------------
+
+Crash and bug fixes
+^^^^^^^^^^^^^^^^^^^
+
+- Fixed ``security.VAList`` checker producing false positives when analyzing
+ C23 code where ``va_start`` expands to ``__builtin_c23_va_start``.
+
+.. comment:
+ This is for the Static Analyzer.
+ Using the caret `^^^` underlining for subsections:
+ - Crash and bug fixes
+ - New checkers and features
+ - Improvements
+ - Moved checkers
+
+.. _release-notes-sanitizers:
+
+Sanitizers
+----------
+- UndefinedBehaviorSanitizer now supports ``__ubsan_default_suppressions``.
+
+Python Binding Changes
+----------------------
+- Add deprecation warnings to ``CompletionChunk.isKind...`` methods.
+ These will be removed in a future release. Existing uses should be adapted
+ to directly compare equality of the ``CompletionChunk`` kind with
+ the corresponding ``CompletionChunkKind`` variant.
+
+ Affected methods: ``isKindOptional``, ``isKindTypedText``, ``isKindPlaceHolder``,
+ ``isKindInformative`` and ``isKindResultType``.
+- Add a deprecation warning to ``CodeCompletionResults.results``.
+ This property will become an implementation detail with changed behavior in a
+ future release and should not be used directly.. Existing uses of
+ ``CodeCompletionResults.results`` should be changed to directly use
+ ``CodeCompletionResults``: it nows supports ``__len__`` and ``__getitem__``,
+ so it can be used the same as ``CodeCompletionResults.results``.
+- Added a new helper method ``get_clang_version`` to the class ``Config`` to
+ read the version string of the libclang in use.
+
+OpenMP Support
+--------------
+- Added support for ``transparent`` clause in task and taskloop directives.
+- Added support for ``use_device_ptr`` clause to accept an optional
+ ``fallback`` modifier (``fb_nullify`` or ``fb_preserve``) with OpenMP >= 61.
+- Added support for ``local`` clause with declare_target directive when
+ OpenMP >= 60.
+
+Improvements
+^^^^^^^^^^^^
+- Improved substitution performance in concept checking. (#GH172266)
+
+- Clang now preserves the left-hand side of a binary expression (such as an
+ assignment or comparison) in a ``RecoveryExpr`` when the right-hand side fails
+ to parse. This improves IDE features like go-to-definition in ``clangd``.
+
+Additional Information
+======================
+
+A wide variety of additional information is available on the `Clang web
+page <https://clang.llvm.org/>`_. The web page contains versions of the
+API documentation which are up-to-date with the Git version of
+the source code. You can access versions of these documents specific to
+this release by going into the "``clang/docs/``" directory in the Clang
+tree.
+
+If you have any questions or comments about Clang, please feel free to
+contact us on the `Discourse forums (Clang Frontend category)
+<https://discourse.llvm.org/c/clang/6>`_.
>From 5f93257f497c37181fa0f14fd3138c7994ae5c77 Mon Sep 17 00:00:00 2001
From: Benjamin Luke <benjamin.luke at sony.com>
Date: Thu, 25 Jun 2026 10:52:16 -0700
Subject: [PATCH 10/12] Add test to ensure that warnings are generated on K&R
style function definitions without a prototype
---
clang/test/CodeGen/target-avx-abi-diag-knr.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 clang/test/CodeGen/target-avx-abi-diag-knr.c
diff --git a/clang/test/CodeGen/target-avx-abi-diag-knr.c b/clang/test/CodeGen/target-avx-abi-diag-knr.c
new file mode 100644
index 0000000000000..c9fca7d39e042
--- /dev/null
+++ b/clang/test/CodeGen/target-avx-abi-diag-knr.c
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -std=c17 -verify=no256,knr -o - -S
+// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -std=c17 -target-feature +avx -verify=knr -o - -S
+// REQUIRES: x86-registered-target
+
+typedef short avx256Type __attribute__((vector_size(32)));
+
+// knr-warning at +3 {{a function definition without a prototype is deprecated in all versions of C and is not supported in C23}}
+// no256-warning at +2 {{AVX vector return of type 'avx256Type' (vector of 16 'short' values) without 'avx' enabled changes the ABI}}
+// no256-warning at +2 {{AVX vector argument of type 'avx256Type' (vector of 16 'short' values) without 'avx' enabled changes the ABI}}
+avx256Type knr_def(x)
+ avx256Type x;
+{
+ return x;
+}
>From 2c4de7de501e9d7fbd48d930534d6a181f66101b Mon Sep 17 00:00:00 2001
From: freaknbigpanda <benjamin.luke at sony.com>
Date: Wed, 1 Jul 2026 11:37:14 -0700
Subject: [PATCH 11/12] fixed conflict with upstream
---
clang/docs/ReleaseNotes.md | 4 +
clang/docs/ReleaseNotes.rst | 915 ------------------------------------
2 files changed, 4 insertions(+), 915 deletions(-)
delete mode 100644 clang/docs/ReleaseNotes.rst
diff --git a/clang/docs/ReleaseNotes.md b/clang/docs/ReleaseNotes.md
index c8b940836a67f..a084024b7a4e4 100644
--- a/clang/docs/ReleaseNotes.md
+++ b/clang/docs/ReleaseNotes.md
@@ -598,6 +598,10 @@ latest release, please see the [Clang Web Site](https://clang.llvm.org) or the
- Improved `-Wassign-enum` performance by caching enum enumerator values. (#GH176454)
+- Clang now emits `-Wpsabi` diagnostics for externally visible x86-64
+ function definitions that return or take AVX or AVX-512 vector types without
+ enabling the corresponding target feature.
+
- Fixed a false negative in `-Warray-bounds` where the warning was suppressed
when accessing a member function on a past-the-end array element.
(#GH179128)
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
deleted file mode 100644
index 80b7880bdc85a..0000000000000
--- a/clang/docs/ReleaseNotes.rst
+++ /dev/null
@@ -1,915 +0,0 @@
-.. If you want to modify sections/contents permanently, you should modify both
- ReleaseNotes.rst and ReleaseNotesTemplate.txt.
-
-===========================================
-Clang |release| |ReleaseNotesTitle|
-===========================================
-
-.. contents::
- :local:
- :depth: 2
-
-Written by the `LLVM Team <https://llvm.org/>`_
-
-.. only:: PreRelease
-
- .. warning::
- These are in-progress notes for the upcoming Clang |version| release.
- Release notes for previous releases can be found on
- `the Releases Page <https://llvm.org/releases/>`_.
-
-Introduction
-============
-
-This document contains the release notes for the Clang C/C++/Objective-C
-frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
-describe the status of Clang in some detail, including major
-improvements from the previous release and new feature work. For the
-general LLVM release notes, see `the LLVM
-documentation <https://llvm.org/docs/ReleaseNotes.html>`_. For the libc++ release notes,
-see `this page <https://libcxx.llvm.org/ReleaseNotes.html>`_. All LLVM releases
-may be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.
-
-For more information about Clang or LLVM, including information about the
-latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
-`LLVM Web Site <https://llvm.org>`_.
-
-Potentially Breaking Changes
-============================
-
-C/C++ Language Potentially Breaking Changes
--------------------------------------------
-
-- Clang now makes it ill-formed to try to ``break`` out of or ``continue`` a loop inside its own condition,
- increment, or init-statement in all C and C++ language modes. This means that code such as
-
- .. code-block:: c++
-
- while (({ break; })) {}
-
- is now ill-formed. An outer loop can still be broken out of or continued so long as the inner loop is
- in the body of the outer loop:
-
- .. code-block:: c++
-
- // Ok, this breaks out of the 'for' loop.
- for (;;) {
- while (({ break; true; })) {}
- }
-
- // Error: can't break out of the 'for' loop from within its own increment.
- for (;;({ while (({ break; true; })) {} })) {}
-
- This also resolves a divergence from GCC: in a construct such as
-
- .. code-block:: c++
-
- for (;;) {
- while (({ break; true; })) {}
- }
-
- Clang would previously ``break`` out of the ``while`` loop, whereas GCC (since version 9) would
- ``break`` out of the ``for`` loop here. Now, Clang and GCC both break out of the ``for`` loop.
-
-C++ Specific Potentially Breaking Changes
------------------------------------------
-
-- Clang now more aggressively optimizes away stores to objects after they are
- dead. This behavior can be disabled with ``-fno-lifetime-dse``.
-
-- Clang now correctly rejects ``export`` declarations in module implementation
- partitions. (#GH107602)
-
-- Template argument deduction now treats the ``N`` in ``_BitInt(N)``
- as being of type ``std::size_t`` instead of ``int``,
- matching the deduction of array sizes from ``int(&)[N]``.
- This is a breaking change for code that depended on the previously deduced type. (#GH195033)
-
-- Clang now rejects nested local classes defined in a different
- block scope than their parent class. (#GH193472)
-
-ABI Changes in This Version
----------------------------
-
-- Fixed incorrect struct layout for ``_BitInt`` bitfields wider than 255 bits
- on MSVC targets. Internal bitfield tracking fields were changed from
- ``unsigned char`` to ``uint64_t`` to prevent overflow. This might be an ABI
- break for such structs compared to earlier Clang versions.
-- Fixed a number of issues with the ``__regcall`` calling convention for passing
- structs on non-Windows x86-64 targets, including a crash when handling empty
- struct arguments. This changes how structs that contain arrays, floating point
- types, or ``_Complex float`` types are passed, and may introduce
- incompatibilities with code compiled by earlier versions of Clang that uses
- the ``__regcall`` calling convention on these targets. (#GH62999) (#GH98635)
-- Fixed Itanium mangling for lambdas in instantiated non-static data member
- initializers by preserving the field-name closure-prefix. This changes the
- mangled names for affected lambdas. (#GH190555)
-
-AST Dumping Potentially Breaking Changes
-----------------------------------------
-
-- The JSON AST dump now includes all fields from ``AvailabilityAttr``: ``platform``,
- ``introduced``, ``deprecated``, ``obsoleted``, ``unavailable``, ``message``,
- ``strict``, ``replacement``, ``priority``, and ``environment``. Previously, these
- fields were missing from the JSON output.
-- Colons that appear at the end of a ParamCommentCommand name are not serialized
- as part of the name.
-
-Clang Frontend Potentially Breaking Changes
--------------------------------------------
-
-- HIPSPV toolchain: `--offload-targets=spirv{32,64}` option is
- deprecated and will be removed when the new offload driver becomes
- default. The replacement for the option is
- `--offload-targets=spirv{32,64}-unknown-chipstar` when using the new
- offload driver (`--offload-new-driver`).
-- The new driver (`--offload-new-driver`) is now default for all offloading
- compilations. This changes the ABI for relocatable device code. Currently,
- libraries will need to be recompiled, or used with
- (`--no-offload-new-driver`). This option will be removed in the next release.
-
-- Clang no longer defines the ``__cpp_impl_coroutine`` feature test macro under the 32-bit x86 Microsoft ABI,
- as support for coroutines on this target is incomplete.
- When using coroutines on this target a warning is emmitted to indicate the lack of full support.
- That warning can be disabled with ``-Wno-coroutines-unsupported-target``. (see #GH59382)
-
-Clang Python Bindings Potentially Breaking Changes
---------------------------------------------------
-- Remove ``CompletionString.Availability``. No libclang interfaces returned instances of it.
-- ``CompletionString.availability`` now returns instances of ``CompletionString.AvailabilityKindCompat``.
-
- Instances of ``AvailabilityKindCompat`` have the same ``__str__`` representation
- as the previous ``CompletionChunk.Kind`` and are equality-comparable with
- the existing ``AvailabilityKind`` enum. It will be replaced by ``AvailabilityKind``
- in a future release. When this happens, the return type of ``CompletionString.availability``
- will change to ``AvailabilityKind``, so it is recommended to use ``AvailabilityKind``
- to compare with the return values of ``CompletionString.availability``.
-- Remove ``availabilityKinds``. In this release, uses of ``availabilityKinds``
- need to be replaced by ``CompletionString.AvailabilityKind``.
-- ``CompletionChunk.kind`` now returns instances of ``CompletionChunkKind``.
-
- Instances of ``CompletionChunkKind`` have the same ``__str__`` representation
- as the previous ``CompletionChunk.Kind`` for compatibility.
- These representations will be changed in a future release to match other enums.
-- Remove ``completionChunkKindMap``. In this release, uses of ``completionChunkKindMap``
- need to be replaced by ``CompletionChunkKind``.
-- Move ``SPELLING_CACHE`` into ``CompletionChunk`` and change it to use
- ``CompletionChunkKind`` instances as keys, instead of the enum values.
- An alias is kept in the form of a ``SPELLING_CACHE`` variable, but it only supports
- ``__getitem__`` and ``__contains__``. It will be removed in a future release.
- Please migrate to using ``CompletionChunk.SPELLING_CACHE`` instead.
-- ``SourceLocation`` and ``SourceRange`` now use ``NotImplemented`` to delegate
- equality checks (``__eq__``) to the other object they are compared with when
- they are of different classes. They previously returned ``False`` when compared
- with objects of other classes.
-- ``TranslationUnit.get_tokens`` now throws an error if both the ``extent`` and
- ``locations`` argument are passed. Previousy, ``locations`` took precedence.
-- ``_CXUnsavedFile`` will be renamed to ``UnsavedFile`` for consistency.
- ``UnsavedFile`` is already available to use and existing uses should
- be adapted to refer to it instead. ``_CXUnsavedFile`` will be removed in a
- future release.
-
-OpenCL Potentially Breaking Changes
------------------------------------
-- Clang now diagnoses zero-length arrays as errors in OpenCL. OpenCL C 3.0
- section 6.11.d states that "Variable length arrays and structures with
- flexible (or unsized) arrays are not supported."
-
-What's New in Clang |release|?
-==============================
-
-C++ Language Changes
---------------------
-
-- ``__is_trivially_equality_comparable`` no longer returns false for all enum types. (#GH132672)
-
-C++2c Feature Support
-^^^^^^^^^^^^^^^^^^^^^
-
-C++23 Feature Support
-^^^^^^^^^^^^^^^^^^^^^
-
-- Partially implement Itanium mangling for pack indexing. Partially substituted packs are not yet supported. (#GH112003)
-
-C++20 Feature Support
-^^^^^^^^^^^^^^^^^^^^^
-
-- Clang now supports `P1857R3 <https://wg21.link/p1857r3>`_ Modules Dependency Discovery. (#GH54047)
-
-C++17 Feature Support
-^^^^^^^^^^^^^^^^^^^^^
-
-Resolutions to C++ Defect Reports
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Implemented `CWG1780 Explicit instantiation/specialization of generic lambda
- operator() <https://cplusplus.github.io/CWG/issues/1780.html>`_
-
-- Clang now allows omitting ``typename`` before a template name in a
- conversion operator, implementing `CWG2413 <https://wg21.link/cwg2413>`_.
-
-- Clang now uses non-reference types for structured bindings whose initializer
- returns a prvalue. This resolves `CWG3135 <https://wg21.link/cwg3135>`_.
-
-C Language Changes
-------------------
-
-C2y Feature Support
-^^^^^^^^^^^^^^^^^^^
-
-- Implemented the type-specific C2y ``<stdbit.h>`` rotate functions with constexpr
- evaluation support:
- ``stdc_rotate_left_{uc,us,ui,ul,ull}`` and
- ``stdc_rotate_right_{uc,us,ui,ul,ull}``.
-
-C23 Feature Support
-^^^^^^^^^^^^^^^^^^^
-- Clang now allows C23 ``constexpr`` struct member access through the dot operator in constant expressions. (#GH178349)
-
-Objective-C Language Changes
------------------------------
-
-- Clang now emits Objective-C number, array, and dictionary literals as
- compile-time constant data structures rather than runtime ``objc_msgSend``
- calls on targets whose runtime supports constant literal classes. The
- feature can be disabled altogether with ``-fno-objc-constant-literals``,
- or selectively per literal kind with ``-fno-constant-nsnumber-literals``,
- ``-fno-constant-nsarray-literals``, and
- ``-fno-constant-nsdictionary-literals``.
-
-Non-comprehensive list of changes in this release
--------------------------------------------------
-
-- Added support for floating point and pointer values in most ``__atomic_``
- builtins.
-
-- Added ``__builtin_stdc_rotate_left`` and ``__builtin_stdc_rotate_right``
- for bit rotation of unsigned integers including ``_BitInt`` types. Rotation
- counts are normalized modulo the bit-width and support negative values.
- Usable in constant expressions. Implicit conversion is supported for
- class/struct types with conversion operators.
-- Implemented the following C23 ``<stdbit.h>`` builtins with ``_BitInt``
- support and constexpr evaluation:
- ``__builtin_stdc_leading_zeros``, ``__builtin_stdc_leading_ones``,
- ``__builtin_stdc_trailing_zeros``, ``__builtin_stdc_trailing_ones``,
- ``__builtin_stdc_first_leading_zero``, ``__builtin_stdc_first_leading_one``,
- ``__builtin_stdc_first_trailing_zero``, ``__builtin_stdc_first_trailing_one``,
- ``__builtin_stdc_count_zeros``, ``__builtin_stdc_count_ones``,
- ``__builtin_stdc_has_single_bit``, ``__builtin_stdc_bit_width``,
- ``__builtin_stdc_bit_floor``, and ``__builtin_stdc_bit_ceil``.
-
-- Implemented the type-specific C23 ``<stdbit.h>`` functions with constexpr
- evaluation support:
- ``stdc_leading_zeros_{uc,us,ui,ul,ull}``,
- ``stdc_leading_ones_{uc,us,ui,ul,ull}``,
- ``stdc_trailing_zeros_{uc,us,ui,ul,ull}``,
- ``stdc_trailing_ones_{uc,us,ui,ul,ull}``,
- ``stdc_first_leading_zero_{uc,us,ui,ul,ull}``,
- ``stdc_first_leading_one_{uc,us,ui,ul,ull}``,
- ``stdc_first_trailing_zero_{uc,us,ui,ul,ull}``,
- ``stdc_first_trailing_one_{uc,us,ui,ul,ull}``,
- ``stdc_count_zeros_{uc,us,ui,ul,ull}``,
- ``stdc_count_ones_{uc,us,ui,ul,ull}``,
- ``stdc_has_single_bit_{uc,us,ui,ul,ull}``,
- ``stdc_bit_width_{uc,us,ui,ul,ull}``,
- ``stdc_bit_floor_{uc,us,ui,ul,ull}``, and
- ``stdc_bit_ceil_{uc,us,ui,ul,ull}``.
-
-- A new generic bit-reverse builtin function ``__builtin_bitreverseg`` that
- extends bit-reversal support to all standard integers type, including
- ``_BitInt``
-
-- Deprecated float types support from ``__builtin_elementwise_max`` and
- ``__builtin_elementwise_min``.
-
-- Added header ``endian.h`` which contains byte order helpers specified in POSIX
-
-- Added #pragma loop licm(disable) for llvm.loop.licm.disable metadata
-
-- Added a new ``ExplicitInstantiationDecl`` AST node to represent explicit
- template instantiations (e.g., ``template void foo<int>();`` or
- ``extern template class S<int>;``). Previously, source location information
- for explicit instantiation statements was discarded after parsing. The new
- node preserves the full source range including the ``extern`` and ``template``
- keywords, qualifiers, template arguments as written, and the declared type,
- enabling tools such as language servers and refactoring engines to accurately
- map source locations back to explicit instantiation sites.
-
-- ``typeid`` on references and pointers of ``final`` types no longer emits a
- vtable lookup at runtime.
-
-- Updated support for Unicode from 15.1 to 18.0.
-
-New Compiler Flags
-------------------
-- New option ``-fms-anonymous-structs`` / ``-fno-ms-anonymous-structs`` added
- to enable or disable Microsoft's anonymous struct/union extension without
- enabling other ``-fms-extensions`` features (#GH177607).
-- New option ``--precompile-reduced-bmi`` allows build system to generate a
- reduced BMI only for a C++20 importable module unit. Previously the users
- can only generate the reduced BMI as a by-product, e.g, an object files or
- a full BMI.
-
-- New ``-cc1`` option ``-fexperimental-overflow-behavior-types`` added to
- enable parsing of the experimental ``overflow_behavior`` type attribute and
- type specifiers.
-
-- New ``-cl`` option ``/d2guardnochecks`` added to match MSVC. When Windows
- Control Flow Guard (CFG) is enabled by other options, it will instruct Clang
- to emit the CFG metadata, but disable adding checks.
-
-- New option ``-fdiagnostics-show-inlining-chain`` added to show inlining chain
- notes for ``[[gnu::warning]]`` and ``[[gnu::error]]`` diagnostics. When a
- function with these attributes is called from an inlined context, Clang can
- now show which functions were inlined to reach the call. When debug info is
- available (``-gline-directives-only`` (implicitly enabled at ``-g1``) or
- higher), accurate source locations are used; otherwise, a heuristic fallback
- is used with a note suggesting how to enable debug info for better accuracy.
-
-- New option ``-fwin-cfg-mechanism=`` added to control the mechanism used by
- Control Flow Guard on Windows. Accepted values are ``automatic`` (default),
- ``dispatch``, and ``check``. The ``dispatch`` mechanism uses the dispatch
- function to perform indirect call checks and can improve performance, while
- ``check`` uses the traditional check mechanism.
-- New ``-cl`` option ``/d2guardcfgdispatch`` added to match MSVC. This acts as a
- shorthand for ``-fwin-cfg-mechanism=dispatch``.
-- New ``-cl`` option ``/d2guardcfgdispatch-`` added to match MSVC. This acts as a
- shorthand for ``-fwin-cfg-mechanism=check``.
-
-- New option ``-f[no-]strict-bool`` added to control whether Clang can assume
- that ``bool`` values loaded from memory cannot have a bit pattern other
- than 0 or 1.
-
-Deprecated Compiler Flags
--------------------------
-
-Modified Compiler Flags
------------------------
-- The `-mno-outline` and `-moutline` compiler flags are now allowed on RISC-V and X86, which both support the machine outliner.
-- The `-mno-outline` flag will now add the `nooutline` IR attribute, so that
- `-mno-outline` and `-moutline` objects can be mixed correctly during LTO.
-
-Removed Compiler Flags
-----------------------
-
-Attribute Changes in Clang
---------------------------
-
-- Added new attribute ``stack_protector_ignore`` to opt specific local variables out of
- the analysis which determines if a function should get a stack protector. A function
- will still generate a stack protector if other local variables or command line flags
- require it.
-
-- Added a new attribute, ``[[clang::no_outline]]`` to suppress outlining from
- annotated functions. This uses the LLVM `nooutline` attribute.
-
-- Introduced a new type attribute ``__attribute__((overflow_behavior))`` which
- currently accepts either ``wrap`` or ``trap`` as an argument, enabling
- type-level control over overflow behavior. There is also an accompanying type
- specifier for each behavior kind via `__ob_wrap` and `__ob_trap`.
-
-- Introduced a new function attribute ``__attribute__((__personality__(...)))``
- to explicitly specify the personality routine for exception handling. THis is
- meant to be a low level tool for language runtime authors to associate a
- foreign language personality with a given function. Note that this does not
- perform any ABI validation for the personality routine.
-
-- :doc:`ThreadSafetyAnalysis` attributes now correctly handle implicit member
- accesses in C, and parameter attributes in C++. This improves diagnostic
- precision and fixes false positives.
-
-- The :doc:`ThreadSafetyAnalysis` attributes ``guarded_by`` and
- ``pt_guarded_by`` now accept multiple capability arguments with refined
- access semantics: *writing* requires all listed capabilities to be held
- exclusively, while *reading* requires at least one to be held. This is
- sound because any writer must hold all capabilities, so holding any one
- prevents concurrent writes.
-
-- :doc:`ThreadSafetyAnalysis` attributes like ``acquire_capability``,
- ``release_capability``, ``requires_capability``, ``locks_excluded``,
- ``try_acquire_capability``, and ``assert_capability`` can now be applied to
- function pointer variables and fields. The analysis checks calls through
- annotated function pointers the same way it checks direct function calls.
- Only plain function pointers are supported; pointers-to-member functions,
- blocks, or wrappers (e.g. ``std::function``) are not yet supported.
-
-- The ``[[clang::unsafe_buffer_usage]]`` attribute is now supported in API
- notes. For example:
-
- .. code-block:: yaml
-
- Functions:
- - Name: myUnsafeFunction
- UnsafeBufferUsage: true
-
-- Added support for ``[[msvc::forceinline]]`` for functions and
- ``[[msvc::forceinline_calls]]`` for statements. Both are aliases to
- ``[[clang::always_inline]]`` with additional checks to ensure that they
- are only accepted in places where MSVC also does.
-
-- The AMDGPU ``amdgpu_num_sgpr`` and ``amdgpu_num_vgpr`` attributes are now
- deprecated. Clang emits a ``-Wdeprecated-declarations`` warning when they
- are used. Use ``amdgpu_waves_per_eu`` instead to control SGPR and VGPR
- usage.
-
-- Clang now allows GNU attributes between a member declarator and bit-field width. (#GH184954)
-
-Improvements to Clang's diagnostics
------------------------------------
-- Fixed bug in ``-Wdocumentation`` so that it correctly handles explicit
- function template instantiations (#64087).
-
-- ``-Wunused-but-set-variable`` now diagnoses file-scope variables with
- internal linkage (``static`` storage class) that are assigned but never used.
- This new coverage is added under the subgroup ``-Wunused-but-set-global``,
- allowing it to be disabled independently with ``-Wno-unused-but-set-global``.
- (#GH148361)
-
-- Added ``-Wlifetime-safety`` to enable lifetime safety analysis,
- a CFG-based intra-procedural analysis that detects use-after-free and related
- temporal safety bugs. See the
- `RFC <https://discourse.llvm.org/t/rfc-intra-procedural-lifetime-analysis-in-clang/86291>`_
- for more details. By design, this warning is enabled in ``-Weverything``. To disable
- the analysis, use ``-Wno-lifetime-safety`` or ``-fno-lifetime-safety``.
-
-- Added ``-Wlifetime-safety-suggestions`` to enable lifetime annotation suggestions.
- This provides suggestions for function parameters that
- should be marked ``[[clang::lifetimebound]]`` based on lifetime analysis. For
- example, for the following function:
-
- .. code-block:: c++
-
- int* p(int *in) { return in; }
-
- Clang will suggest:
-
- .. code-block:: c++
-
- warning: parameter in intra-TU function should be marked [[clang::lifetimebound]]
- int* p(int *in) { return in; }
- ^~~~~~~
- [[clang::lifetimebound]]
- note: param returned here
- int* p(int *in) { return in; }
- ^~
-
-- Added ``-Wlifetime-safety-noescape`` to detect misuse of ``[[clang::noescape]]``
- annotation where the parameter escapes through return. For example:
-
- .. code-block:: c++
-
- int* p(int *in [[clang::noescape]]) { return in; }
-
- Clang will warn:
-
- .. code-block:: c++
-
- warning: parameter is marked [[clang::noescape]] but escapes
- int* p(int *in [[clang::noescape]]) { return in; }
- ^~~~~~~
- note: returned here
- int* p(int *in [[clang::noescape]]) { return in; }
- ^~
-
-- Added ``-Wlifetime-safety-dangling-field`` to detect dangling field references
- when stack memory escapes to class fields. This is part of ``-Wlifetime-safety``
- and detects cases where local variables or parameters are stored in fields but
- outlive their scope. For example:
-
- .. code-block:: c++
-
- struct DanglingView {
- std::string_view view;
- DanglingView(std::string s) : view(s) {} // warning: address of stack memory escapes to a field
- };
-
-- Improved ``-Wassign-enum`` performance by caching enum enumerator values. (#GH176454)
-
-- Clang now emits ``-Wpsabi`` diagnostics for externally visible x86-64
- function definitions that return or take AVX or AVX-512 vector types without
- enabling the corresponding target feature.
-
-- Fixed a false negative in ``-Warray-bounds`` where the warning was suppressed
- when accessing a member function on a past-the-end array element.
- (#GH179128)
-
-- Added a missing space to the FixIt for the ``implicit-int`` group of diagnostics and
- made sure that only one such diagnostic and FixIt is emitted per declaration group. (#GH179354)
-
-- Fixed the Fix-It insertion point for ``expected ';' after alias declaration``
- when parsing alias declarations involving a token-split ``>>`` sequence
- (for example, ``using A = X<int>>;``). (#GH184425)
-
-- Fixed incorrect ``implicitly deleted`` diagnostic for explicitly deleted
- candidate function. (#GH185693)
-
-- The ``-Wloop-analysis`` warning has been extended to catch more cases of
- variable modification inside lambda expressions (#GH132038).
-
-- Clang now emits ``-Wsizeof-pointer-memaccess`` when snprintf/vsnprintf use the sizeof
- the destination buffer(dynamically allocated) in the len parameter(#GH162366)
-
-- Added ``-Wmodule-map-path-outside-directory`` (off by default) to warn on
- header and umbrella directory paths that use ``..`` to refer outside the module
- directory in module maps found via implicit search
- (``-fimplicit-module-maps``). This does not affect module maps specified
- explicitly via ``-fmodule-map-file=``.
-
-- Honour ``[[maybe_unused]]`` attribute on private fields.
- ``-Wunused-private-field`` no longer emits a warning for annotated private
- fields.
-
-- Improved ``-Wgnu-zero-variadic-macro-arguments`` to suggest using
- ``__VA_OPT__`` if the current language version supports it(#GH188624)
-
-- Clang now emits an error when implicitly casting a complex type to a built-in vector type. (#GH186805)
-
-- Added ``-Wnonportable-include-path-separator`` (off by default) to catch
- #include directives that use backslashes as a path separator. The warning
- includes a FixIt to change all the backslashes to forward slashes, so that the
- code can automatically be made portable to other host platforms that don't
- support backslashes.
-
-- Clang now explains why template deduction fails for explicit template arguments.
-
-- No longer emitting a ``-Wpre-c2y-compat`` or extension diagnostic about use
- of octal literals with a ``0o`` prefix, and no longer emitting a
- ``-Wdeprecated-octal-literals`` diagnostic for use of octal literals without
- a ``0o`` prefix, when the literal is expanded from a macro defined in a
- system header. (#GH192389)
-
-- Improved error recovery for missing semicolons after class members. Clang now avoids
- skipping subsequent valid declarations when their previous decl is missing semicolon.
-
-- Removed the body of lambdas from some diagnostic messages.
-
-- Fixed false positive host-device mismatch errors in discarded `if constexpr` branches for CUDA/HIP;
- such calls are now correctly skipped.
-
-- Clang now errors when a function declaration aliases a variable or vice versa. (#GH195550)
-
-- Added ``-Wattribute-alias`` to diagnose type mismatches between an alias and its aliased function. (#GH195550)
-
-- The diagnostics around ``__block`` now explain why a variable cannot be marked ``__block``. (#GH197213)
-
-- Extended ``-Wnonportable-include-path`` to warn about trailing whitespace and dots in ``#include`` paths. (#GH190610)
-
-- Clang now emits error when attribute is missing closing ``]]`` followed by ``;;``. (#GH187223)
-
-Improvements to Clang's time-trace
-----------------------------------
-
-Improvements to Coverage Mapping
---------------------------------
-
-- [MC/DC] Nested expressions are handled as individual MC/DC expressions.
-- "Single byte coverage" now supports branch coverage and can be used
- together with ``-fcoverage-mcdc``.
-- Consteval member functions are no longer emitted in coverage mappings,
- matching the existing behavior for free consteval functions. (#GH164448)
-
-Bug Fixes in This Version
--------------------------
-
-- Fixed atomic boolean compound assignment; the conversion back to atomic bool would be miscompiled. (#GH33210)
-- Correctly handle default template argument when establishing subsumption. (#GH188640)
-- Fixed a failed assertion in the preprocessor when ``__has_embed`` parameters are missing parentheses. (#GH175088)
-- Fix lifetime extension of temporaries in for-range-initializers in templates. (#GH165182)
-- Fixed a preprocessor crash in ``__has_cpp_attribute`` on incomplete scoped attributes. (#GH178098)
-- Fixes an assertion failure when evaluating ``__underlying_type`` on enum redeclarations. (#GH177943)
-- Fixed an assertion failure caused by nested macro expansion during header-name lexing (``__has_embed(__has_include)``). (#GH178635)
-- Clang now outputs relative paths of embeds for dependency output. (#GH161950)
-- Fix the result type of a binary operation where both operands are 'void' l-values. (#GH111300)
-- Fixed an assertion failure when evaluating ``_Countof`` on invalid ``void``-typed operands. (#GH180893)
-- Fixed an assertion failure in the serialized diagnostic printer when it is destroyed without calling ``finish()``. (#GH140433)
-- Fixed an assertion failure caused by error recovery while extending a nested name specifier with results from ordinary lookup. (#GH181470)
-- Fixed a crash when parsing ``#pragma clang attribute`` arguments for attributes that forbid arguments. (#GH182122)
-- Fixed a bug with multiple-include optimization (MIOpt) state not being preserved in some cases during lexing, which could suppress header-guard mismatch diagnostics and interfere with include-guard optimization. (#GH180155)
-- Fixed a crash when normalizing constraints involving concept template parameters whose index coincided with non-concept template parameters in the same parameter mapping.
-- Fixed a crash caused by accessing dependent diagnostics of a non-dependent context.
-- Fixed a crash when substituting into a non-type template parameter that has a type containing an undeduced placeholder type.
-- Fixed several crashes and improved diagnostics when a multidimensional subscript operator is applied to a built-in type. (#GH187800)
-- Correctly diagnosing and no longer crashing when ``export module foo``
- (without a semicolon) are the final tokens in a module file. (#GH187771)
-- Fixed a crash in duplicate attribute checking caused by comparing constant arguments with different integer signedness. (#GH188259)
-- Clang now emits an error when returning an initializer list from a lambda
- with an explicit return type of void. The diagnostic now correctly refers
- to "lambda" instead of "block". (#GH188661)
-- Fixed a crash on _BitInt(N) arrays where 129 ≤ N ≤ 192 due to incorrect array filler lowering. (#GH189643)
-- Fixed the behavior in C23 of ``auto``, by emitting an error when an array type is specified for a ``char *``. (#GH162694)
-- Fixed an issue where an assert was thrown instead of an error if no vulkan env was specified with ``--triple spirv``. (#GH189964)
-- Fixed incorrect rejection of ``auto`` with reordered declaration specifiers in C23. (#GH164121)
-- Fixed a crash where constexpr evaluation encountered invalid overrides. (#GH183290)
-- Fixed a bug where Clang fails to find instantiation of Decls in constraint checking. (#GH173086)
-- Fixed a crash when assigning to an element of an ``ext_vector_type`` with ``bool`` element type. (#GH189260)
-- Fixed a crash caused by declaring multiple ``ownership_returns`` attributes with mismatched or missing arguments. (#GH188733)
-- Clang now emits an error for friend declarations of lambda members. (#GH26540)
-- Fixed a crash caused by lambda capture handling in delayed default arguments. (#GH176534)
-- Fixed a crash when parsing invalid ``static_assert`` declarations with string-literal messages (#GH187690).
-- Fixed a potential stack-use-after-return issue in Clang when copy-initializing
- an array via an element-at-a-time copy loop (#GH192026)
-- Fixed an issue where certain designated initializers would be rejected for constexpr variables. (#GH193373)
-- Fixed a crash when ``#embed`` is used with C++ modules (#GH195350)
-
-Bug Fixes to Compiler Builtins
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Fix a crash when passing an unresolved overload set to ``__builtin_classify_type``. (#GH175589)
-- Fixed a crash when calling `__builtin_allow_sanitize_check` with no arguments. (#GH183927)
-- ``__annotation`` is now diagnosed as unsupported on non-Windows/UEFI targets, fixing a
- crash when using it with ``-fms-extensions`` on other platforms. (#GH184318)
-
-Bug Fixes to Attribute Support
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Fixed a behavioral discrepancy between deleted functions and private members when checking the ``enable_if`` attribute. (#GH175895)
-- Fixed ``init_priority`` attribute by delaying type checks until after the type is deduced.
-
-Bug Fixes to C++ Support
-^^^^^^^^^^^^^^^^^^^^^^^^
-- Fixed a preprocessor assertion failure triggered when parsing an invalid template-id starting with ``::template operator``. (#GH186582)
-- Fixed a crash when a function template is defined as a non-template friend with a global scope qualifier. (#GH185341)
-- Clang now rejects constant template parameters with block pointer types, since these are not implemented anyway and would lead to crashes. (#GH189247)
-- Fixed a crash on error recovery when dealing with invalid templates. (#GH183075)
-- Fixed a crash when instantiating ``requires`` expressions involving substitution failures in C++ concepts. (#GH176402)
-- Concepts appearing in the require-clause of a member function no longer have access to non-public members of that class,
- or to a current class object. (#GH115838) (#GH194803) (#GH197067)
-- We no longer caches invalid variable specializations. (#GH132592)
-- Fixed an incorrect template argument deduction when matching packs of template
- template parameters when one of its parameters is also a pack. (#GH181166)
-- Clang no longer errors on overloads with different ref-qualifiers and constraints. (#GH120812)
-- Fixed a crash when a default argument is passed to an explicit object parameter. (#GH176639)
-- Fixed an alias template CTAD crash.
-- Correctly diagnose uses of ``co_await`` / ``co_yield`` in the default argument of nested function declarations. (#GH98923)
-- Fixed a crash when diagnosing an invalid static member function with an explicit object parameter (#GH177741)
-- Clang incorrectly instantiated variable specializations outside of the immediate context. (#GH54439)
-- Fixed a crash when pack expansions are used as arguments for non-pack parameters of built-in templates. (#GH180307)
-- Fix a problem where a substitution failure when evaluating a type requirement
- could directly make the program ill-formed.
-- Fix a problem where pack index expressions where incorrectly being regarded as equivalent.
-- Fixed a bug where captured variables in non-mutable lambdas were incorrectly treated as mutable
- when used inside decltype in the return type. (#GH180460)
-- Fixed a crash when evaluating uninitialized GCC vector/ext_vector_type vectors in ``constexpr``. (#GH180044)
-- Fixed a crash when `explicit(bool)` is used with an incomplete enumeration. (#GH183887)
-- Fixed a crash on ``typeid`` of incomplete local types during template instantiation. (#GH63242), (#GH176397)
-- Fixed spurious diagnostics produced when checking if constraints are equivalent for redeclarations,
- which could make the program mistakenly ill-formed.
-- Fixed a crash when an immediate-invoked ``consteval`` lambda is used as an invalid initializer. (#GH185270)
-- Fixed an assertion failure when using a global destructor with a target with a non-default program address space. (#GH186484)
-- Fixed a crash when instantiating an invalid out-of-line static data member definition in a local class. (#GH176152)
-- Inherited constructors in ``dllexport`` classes are now exported for ABI-compatible cases, matching
- MSVC behavior. Constructors with variadic arguments or callee-cleanup parameters are not yet supported
- and produce a warning. (#GH162640)
-- Correctly diagnose invalid non-dependent calls in dependent contexts. (#GH135694)
-- Fix initialization of GRO when GRO-return type mismatches, as part of CWG2563. (#GH98744)
-- Fix an error using an initializer list with array new for a type that is not default-constructible. (#GH81157)
-- We no longer consider conversion operators when copy-initializing from the same type. This was non
- conforming and could lead to recursive constraint satisfaction checking. (#GH149443)
-- Fixed a crash in Itanium C++ name mangling for a lambda in a local class field initializer inside a constructor/destructor. (#GH176395)
-- Fixed crashes in Itanium C++ name mangling for lambdas with trailing requires-clauses involving requires-expressions. (#GH100774) (#GH123854)
-- Fixed an invalid rejection and assertion failure while generating ``operator=`` for fields with the ``__restrict`` qualifier. (#GH37979)
-- Fixed a use-after-free bug when parsing default arguments containing lambdas in declarations with template-id declarators. (#GH196725)
-- Fixed a crash in constant evaluation using placement new on an array which was later initialized. (#GH196450)
-- Fixed an issue where Clang incorrectly accepted invalid unqualified uses of local nested class names outside their declaring scope. (#GH184622)
-
-Bug Fixes to AST Handling
-^^^^^^^^^^^^^^^^^^^^^^^^^
-- Fixed a bug where explicit nullability property attributes were not stored in AST nodes in Objective-C. (#GH179703)
-- Fixed a bug where alias CTAD, or an invalid template template parameter, could create a template with an empty template
- parameter list. This also adds asserts to prevent this from happening again.
-- Fixed a crash when parsing Doxygen ``@param`` commands attached to invalid declarations or non-function entities. (#GH182737)
-- Fixed the SourceLocation and SourceRange of reversed rewritten CXXOperatorCallExpr. (#GH192467)
-- Fixed a assertion when ``__block`` is used on global variables in C mode. (#GH183974)
-
-Miscellaneous Bug Fixes
-^^^^^^^^^^^^^^^^^^^^^^^
-- Fixed the arguments of the format attribute on ``__builtin_os_log_format``. Previously, they were off by 1.
-
-Miscellaneous Clang Crashes Fixed
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-- Fixed a crash when attempting to jump over initialization of a variable with variably modified type. (#GH175540)
-- Fixed a crash when using loop hint with a value dependent argument inside a
- generic lambda. (#GH172289)
-- Fixed a crash in C++ overload resolution with ``_Atomic``-qualified argument types. (#GH170433)
-- Fixed a crash related to missing source locations (#GH186655)
-- Fixed a crash when casting a parenthesized unresolved template-id or array section. (#GH183505)
-- Fixed a crash when initializing a ``constexpr`` pointer with a floating-point literal in C23. (#GH180313)
-- Fixed a lack of diagnostic for substitution failures in base classes when using `std::void_t`-like types.
-- Fixed a crash when emitting debug info for base classes with instantiation-dependent-only types (#GH193932)
-- Fixed an assertion when diagnosing address-space qualified ``new``/``delete`` in language-defined address spaces such as OpenCL ``__local``. (#GH178319)
-- Fixed an assertion failure in ObjC++ ARC when binding a rvalue reference to reference with different lifetimes (#GH178524)
-- Fixed a crash when subscripting a vector type with large unsigned integer values. (#GH180563)
-- Fixed a crash when attempting to diagnose incompatible conversions involving function types (#GH182534)
-- Fixed a crash when evaluating ``__is_bitwise_cloneable`` on invalid record types. (#GH183707)
-- Fixed an assertion failure when casting a function pointer with a target with a non-default program address space. (#GH186210)
-- Fixed a crash when ``decltype(__builtin_FUNCTION())`` is used as a template type argument. (#GH167433)
-- Fixed an assertion failure when parsing an invalid ``decltype`` specifier with missing parentheses or extra semicolons. (#GH188014)
-- Fixed a crash when explicitly casting a complex type to or from an atomic complex type. (#GH172208)
-- Fixed a crash when explicitly casting a scalar to an atomic complex. (#GH114885)
-- Fixed an assertion failure when parsing an invalid out-of-line enum definition with template parameters. (#GH187909)
-- Fixed an assertion failure on invalid template template parameter during typo correction. (#GH183983)
-- Fixed an assertion failure in ``isAtEndOfMacroExpansion`` on macro expansions crossing the boundary of two fileIDs. (#GH115007), (#GH21755)
-
-OpenACC Specific Changes
-------------------------
-
-Target Specific Changes
------------------------
-
-AMDGPU Support
-^^^^^^^^^^^^^^
-- Introduced a new target specific builtin ``__builtin_amdgcn_processor_is``,
- a late / deferred query for the current target processor.
-- Introduced a new target specific builtin ``__builtin_amdgcn_is_invocable``,
- a late / deferred query for the availability of target specific builtins.
-- Initial support for gfx1310
-- The ``amdgpu_num_sgpr`` and ``amdgpu_num_vgpr`` function attributes are now
- deprecated. Using them produces a ``-Wdeprecated-declarations`` warning. Use
- ``amdgpu_waves_per_eu`` instead.
-
-NVPTX Support
-^^^^^^^^^^^^^^
-
-X86 Support
-^^^^^^^^^^^
-- ``march=znver6`` is now supported.
-
-Arm and AArch64 Support
-^^^^^^^^^^^^^^^^^^^^^^^
-
-Android Support
-^^^^^^^^^^^^^^^
-
-Windows Support
-^^^^^^^^^^^^^^^
-
-- Clang now defines the ``_MSVC_TRADITIONAL`` macro as ``1`` when emulating MSVC
- 19.15 (Visual Studio 2017 version 15.8) and later. (#GH47114)
-- ``-fmacro-prefix-map=`` (``-ffile-prefix-map=``) now affects an anonymous namespace hash generation
- for the MSVC targets and allows deterministic symbol mangling for reproducible builds.
-
-LoongArch Support
-^^^^^^^^^^^^^^^^^
-
-- DWARF fission is now compatible with linker relaxations, allowing `-gsplit-dwarf` and `-mrelax`
- to be used together when building for the LoongArch platform.
-
-RISC-V Support
-^^^^^^^^^^^^^^
-
-- Tenstorrent Ascalon D8 was renamed to Ascalon X. Use `tt-ascalon-x` with `-mcpu` or `-mtune`.
-- Intrinsics were added for the 'Zvabd` (RISC-V Integer Vector Absolute Difference) extension.
-- Intrinsics were added for the 'Zvzip` (Reordering Structured Data in Vector Registers) extension.
-
-CUDA/HIP Language Changes
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-- The new offloading driver is now the default for HIP. Use
- `--no-oflfoad-new-driver` to return to the old behavior.
-
-CUDA Support
-^^^^^^^^^^^^
-
-AIX Support
-^^^^^^^^^^^
-
-- The driver default for the linker flag `-bcdtors` now defaults to `mbr`
- (instead of `all`) which only extracts static init from archive members which
- would otherwise be referenced.
- (See https://www.ibm.com/docs/en/aix/7.2.0?topic=l-ld-command for details).
-
-NetBSD Support
-^^^^^^^^^^^^^^
-
-WebAssembly Support
-^^^^^^^^^^^^^^^^^^^
-
-- Fixed a crash when ``__funcref`` is applied to a non-function pointer type.
- (#GH118233)
-
-AVR Support
-^^^^^^^^^^^
-
-SystemZ Support
-^^^^^^^^^^^^^^^
-
-- Add support for `#pragma export` for z/OS. This is a pragma used to export functions and variables
- with external linkage from shared libraries. It provides compatibility with the IBM XL C/C++
- compiler.
-
-DWARF Support in Clang
-----------------------
-
-Floating Point Support in Clang
--------------------------------
-
-Fixed Point Support in Clang
-----------------------------
-
-AST Matchers
-------------
-- Add ``functionTypeLoc`` matcher for matching ``FunctionTypeLoc``.
-- Add missing support for ``TraversalKind`` in some ``addMatcher()`` overloads.
-
-clang-format
-------------
-- Add ``ObjCSpaceAfterMethodDeclarationPrefix`` option to control space between the
- '-'/'+' and the return type in Objective-C method declarations
-- Deprecate the ``BinPackParameters`` and ``BinPackArguments`` options and replace
- them with the ``PackParameters`` and ``PackArguments`` structs (respectively) to
- unify packing behavior. Add the ``BreakAfter`` option to the structs, allowing
- parameter and argument lists to be formatted with one parameter/argument on each
- line if they exceed the specified count.
-- Add ``AfterComma`` value to ``BreakConstructorInitializers`` to allow breaking
- constructor initializers after commas, keeping the colon on the same line.
-- Extend ``BreakBinaryOperations`` to accept a structured configuration with
- per-operator break rules and minimum chain length gating via ``PerOperator``.
-- Add ``AllowShortRecordOnASingleLine`` option and set it to ``EmptyAndAttached`` for LLVM style.
-- Add ``BreakFunctionDeclarationParameters`` option to always break before function
- declaration parameters.
-- Add ``EnumAssignments`` option to ``AlignConsecutiveAssignments`` for aligning
- enum assignments without affecting other assignments.
-- Add ``BreakBeforeReturnType`` option to break before the function return
- type.
-
-libclang
---------
-- Visit constraints of `auto` type to properly visit concept usages (#GH166580)
-- Visit switch initializer statements (https://bugs.kde.org/show_bug.cgi?id=415537#c2)
-- Fix crash in clang_getBinaryOperatorKindSpelling and clang_getUnaryOperatorKindSpelling
-- The clang_Module_getASTFile API is deprecated and now always returns nullptr
-
-Code Completion
----------------
-
-- Fixed a crash in code completion when using a C-Style cast with a parenthesized
- operand in Objective-C++ mode. (#GH180125)
-
-Static Analyzer
----------------
-
-Crash and bug fixes
-^^^^^^^^^^^^^^^^^^^
-
-- Fixed ``security.VAList`` checker producing false positives when analyzing
- C23 code where ``va_start`` expands to ``__builtin_c23_va_start``.
-
-.. comment:
- This is for the Static Analyzer.
- Using the caret `^^^` underlining for subsections:
- - Crash and bug fixes
- - New checkers and features
- - Improvements
- - Moved checkers
-
-.. _release-notes-sanitizers:
-
-Sanitizers
-----------
-- UndefinedBehaviorSanitizer now supports ``__ubsan_default_suppressions``.
-
-Python Binding Changes
-----------------------
-- Add deprecation warnings to ``CompletionChunk.isKind...`` methods.
- These will be removed in a future release. Existing uses should be adapted
- to directly compare equality of the ``CompletionChunk`` kind with
- the corresponding ``CompletionChunkKind`` variant.
-
- Affected methods: ``isKindOptional``, ``isKindTypedText``, ``isKindPlaceHolder``,
- ``isKindInformative`` and ``isKindResultType``.
-- Add a deprecation warning to ``CodeCompletionResults.results``.
- This property will become an implementation detail with changed behavior in a
- future release and should not be used directly.. Existing uses of
- ``CodeCompletionResults.results`` should be changed to directly use
- ``CodeCompletionResults``: it nows supports ``__len__`` and ``__getitem__``,
- so it can be used the same as ``CodeCompletionResults.results``.
-- Added a new helper method ``get_clang_version`` to the class ``Config`` to
- read the version string of the libclang in use.
-
-OpenMP Support
---------------
-- Added support for ``transparent`` clause in task and taskloop directives.
-- Added support for ``use_device_ptr`` clause to accept an optional
- ``fallback`` modifier (``fb_nullify`` or ``fb_preserve``) with OpenMP >= 61.
-- Added support for ``local`` clause with declare_target directive when
- OpenMP >= 60.
-
-Improvements
-^^^^^^^^^^^^
-- Improved substitution performance in concept checking. (#GH172266)
-
-- Clang now preserves the left-hand side of a binary expression (such as an
- assignment or comparison) in a ``RecoveryExpr`` when the right-hand side fails
- to parse. This improves IDE features like go-to-definition in ``clangd``.
-
-Additional Information
-======================
-
-A wide variety of additional information is available on the `Clang web
-page <https://clang.llvm.org/>`_. The web page contains versions of the
-API documentation which are up-to-date with the Git version of
-the source code. You can access versions of these documents specific to
-this release by going into the "``clang/docs/``" directory in the Clang
-tree.
-
-If you have any questions or comments about Clang, please feel free to
-contact us on the `Discourse forums (Clang Frontend category)
-<https://discourse.llvm.org/c/clang/6>`_.
>From a8e78f29173a4c762d7a9134297fa1bc6e25243e Mon Sep 17 00:00:00 2001
From: freaknbigpanda <benjamin.luke at sony.com>
Date: Wed, 1 Jul 2026 11:58:32 -0700
Subject: [PATCH 12/12] fixed bad merge
---
libcxx/include/__algorithm/simd_utils.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h
index 5b87f13e5bb01..495aed4e21216 100644
--- a/libcxx/include/__algorithm/simd_utils.h
+++ b/libcxx/include/__algorithm/simd_utils.h
@@ -125,7 +125,6 @@ template <class _VecT, size_t _Np, class _Iter>
return _VecT{__iter[_LoadIndices]..., ((void)_ZeroIndices, 0)...};
}(make_index_sequence<_Np>{}, make_index_sequence<__simd_vector_size_v<_VecT> - _Np>{});
}
-_LIBCPP_DIAGNOSTIC_POP
template <class _Tp, size_t _Np>
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool __any_of(__simd_vector<_Tp, _Np> __vec) noexcept {
More information about the libcxx-commits
mailing list