<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/docs/ReleaseNotes.rst, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>Don't mark lambda non-dependent if nested in a generic lambda. (#149121)</title>
<updated>2025-11-23T03:11:58+00:00</updated>
<author>
<name>Daniel M. Katz</name>
<email>katzdm@gmail.com</email>
</author>
<published>2025-11-23T03:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=525e68e9e9a44e88eb88ef2d6f058a482972c989'/>
<id>525e68e9e9a44e88eb88ef2d6f058a482972c989</id>
<content type='text'>
Fixes #118187
Fixes #156579

An instantiated `LambdaExpr` can currently be marked as
`LDK_NeverDependent` if it's nested within a generic lambda. If that
`LambdaExpr` in fact depends on template parameters introduced by the
enclosing generic lambda, then its dependence will be misreported as
"never dependent" and spurious diagnostics can result.

The fix here proposed is a bit ugly, but the condition that it's being
bolted onto already seems like a bit of a hack, so this seems no worse
for wear.

Note that #89702 surfaced this change because it caused the inner lambda
expression to (correctly) be considered in a constant-evaluated context.
The affected check for whether to mark the inner lambda as
`LDK_NeverDependent` therefore started to apply, whereas it didn't
before.

**Tested**: `check-clang` and `check-cxx`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #118187
Fixes #156579

An instantiated `LambdaExpr` can currently be marked as
`LDK_NeverDependent` if it's nested within a generic lambda. If that
`LambdaExpr` in fact depends on template parameters introduced by the
enclosing generic lambda, then its dependence will be misreported as
"never dependent" and spurious diagnostics can result.

The fix here proposed is a bit ugly, but the condition that it's being
bolted onto already seems like a bit of a hack, so this seems no worse
for wear.

Note that #89702 surfaced this change because it caused the inner lambda
expression to (correctly) be considered in a constant-evaluated context.
The affected check for whether to mark the inner lambda as
`LDK_NeverDependent` therefore started to apply, whereas it didn't
before.

**Tested**: `check-clang` and `check-cxx`.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reland [MS][clang] Add support for vector deleting destructors" (#169116)</title>
<updated>2025-11-22T01:14:34+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2025-11-22T01:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=54a4da9df6906b63878ad6d0ea6da3ed7d2d8432'/>
<id>54a4da9df6906b63878ad6d0ea6da3ed7d2d8432</id>
<content type='text'>
This reverts 4d10c1165442cbbbc0017b48fcdd7dae1ccf3678 and its two
dependent commits: e6b9805b574bb5c90263ec7fbcb94df76d2807a4 and
c243406a695ca056a07ef4064b0f9feee7685320, see discussion in
https://github.com/llvm/llvm-project/pull/165598#issuecomment-3563825509.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts 4d10c1165442cbbbc0017b48fcdd7dae1ccf3678 and its two
dependent commits: e6b9805b574bb5c90263ec7fbcb94df76d2807a4 and
c243406a695ca056a07ef4064b0f9feee7685320, see discussion in
https://github.com/llvm/llvm-project/pull/165598#issuecomment-3563825509.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Fix handling of explicit parameters in `SemaLambda` (#168558)</title>
<updated>2025-11-21T12:37:05+00:00</updated>
<author>
<name>Willem Kaufmann</name>
<email>willem.kaufmann@gmail.com</email>
</author>
<published>2025-11-21T12:37:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=41a9df2389b6db45b5159073c52232dd867c7f25'/>
<id>41a9df2389b6db45b5159073c52232dd867c7f25</id>
<content type='text'>
Previously, the presence of an explicit parameter list was detected by
querying `getNumTypeObjects()` from the `Declarator` block of the lambda
definition. This breaks for lambdas which do not have a parameter list
but _do_ have a trailing return type; that is, both of

```
[]() -&gt; int { return 0; };
[] -&gt; int { return 0; };
```

would return `true` when inspecting
`LambdaExpr::hasExplicitParameters()`.

Fix this by instead querying the `LParenLoc()` from the `Declarator`'s
`FunctionTypeInfo`. If `isValid() == true`, then an explicit parameter
list must be present, and if it is `false`, then it is not.

This commit also adds `hasExplicitParameters` as an attribute to a
`LambdaExpr`'s JSON AST dump. A new test (`ast-dump-lambda-json.cpp`) is
also added to validate the fix and presence of the new attribute in the
output. `ast-dump-expr-json.cpp` is also updated to validate the new
attribute.

Fixes https://github.com/llvm/llvm-project/issues/168452.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the presence of an explicit parameter list was detected by
querying `getNumTypeObjects()` from the `Declarator` block of the lambda
definition. This breaks for lambdas which do not have a parameter list
but _do_ have a trailing return type; that is, both of

```
[]() -&gt; int { return 0; };
[] -&gt; int { return 0; };
```

would return `true` when inspecting
`LambdaExpr::hasExplicitParameters()`.

Fix this by instead querying the `LParenLoc()` from the `Declarator`'s
`FunctionTypeInfo`. If `isValid() == true`, then an explicit parameter
list must be present, and if it is `false`, then it is not.

This commit also adds `hasExplicitParameters` as an attribute to a
`LambdaExpr`'s JSON AST dump. A new test (`ast-dump-lambda-json.cpp`) is
also added to validate the fix and presence of the new attribute in the
output. `ast-dump-expr-json.cpp` is also updated to validate the new
attribute.

Fixes https://github.com/llvm/llvm-project/issues/168452.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenCL] Add missing OpenCL 3.0 features to OpenCLExtensions.def; revert header-only macros (#168016)</title>
<updated>2025-11-21T01:17:43+00:00</updated>
<author>
<name>Wenju He</name>
<email>wenju.he@intel.com</email>
</author>
<published>2025-11-21T01:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=423bdb2bf257e19271d62e60b6339d84b8ce05aa'/>
<id>423bdb2bf257e19271d62e60b6339d84b8ce05aa</id>
<content type='text'>
Adds the remaining optional feature macros from the OpenCL C 3.0 spec
(section 6.2.1 table). Targets can now enable these via
OpenCLFeaturesMap returned by getSupportedOpenCLOpts().

Revert a84599f177a6 (header‑only feature macros).
Header‑only macros are difficult to disable on SPIR-V targets,
and the prior undef approach (a60b8f468119) does not scale.
After this PR, they can be disabled via `-cl-ext=-&lt;feature&gt;`.

https://github.com/KhronosGroup/OpenCL-Docs/issues/1328 also notes that
unconditional definition of the header‑only macros in opencl-c-base.h
should be removed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the remaining optional feature macros from the OpenCL C 3.0 spec
(section 6.2.1 table). Targets can now enable these via
OpenCLFeaturesMap returned by getSupportedOpenCLOpts().

Revert a84599f177a6 (header‑only feature macros).
Header‑only macros are difficult to disable on SPIR-V targets,
and the prior undef approach (a60b8f468119) does not scale.
After this PR, they can be disabled via `-cl-ext=-&lt;feature&gt;`.

https://github.com/KhronosGroup/OpenCL-Docs/issues/1328 also notes that
unconditional definition of the header‑only macros in opencl-c-base.h
should be removed.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][diagnostics] added warning for possible enum compare typo (#168445)</title>
<updated>2025-11-20T14:05:03+00:00</updated>
<author>
<name>GrumpyPigSkin</name>
<email>130710602+GrumpyPigSkin@users.noreply.github.com</email>
</author>
<published>2025-11-20T14:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aeba7a8adef9a8ea624aa5be3b95a8a9fb5a17dd'/>
<id>aeba7a8adef9a8ea624aa5be3b95a8a9fb5a17dd</id>
<content type='text'>
Added diagnosis and fixit comment for possible accidental comparison
operator in an enum.

Closes: #168146</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added diagnosis and fixit comment for possible accidental comparison
operator in an enum.

Closes: #168146</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (#166798)</title>
<updated>2025-11-19T19:41:06+00:00</updated>
<author>
<name>Benjamin Stott</name>
<email>Benjamin.Stott@sony.com</email>
</author>
<published>2025-11-19T19:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=60a27953eabe3a0ded7c9b7b7786dfd1fe5d8c5f'/>
<id>60a27953eabe3a0ded7c9b7b7786dfd1fe5d8c5f</id>
<content type='text'>
- Fixes https://github.com/llvm/llvm-project/issues/166512
- `ComplexExprEmitter::EmitCompoundAssignLValue` is calling
`EmitLoadOfScalar(LValue, SourceLocation)` to load the LHS value in the
case that it's non-complex, however this function requires that the
value is a simple LValue - issue occurred because the LValue in question
was a bitfield LValue. I changed it to use this function which seems to
handle all of the different cases (deferring to the original
`EmitLoadOfScalar` if it's a simple LValue)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fixes https://github.com/llvm/llvm-project/issues/166512
- `ComplexExprEmitter::EmitCompoundAssignLValue` is calling
`EmitLoadOfScalar(LValue, SourceLocation)` to load the LHS value in the
case that it's non-complex, however this function requires that the
value is a simple LValue - issue occurred because the LValue in question
was a bitfield LValue. I changed it to use this function which seems to
handle all of the different cases (deferring to the original
`EmitLoadOfScalar` if it's a simple LValue)</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Introduce malloc_span attribute (#167010)</title>
<updated>2025-11-19T17:03:22+00:00</updated>
<author>
<name>Aleksandr Nogikh</name>
<email>wp32pw@gmail.com</email>
</author>
<published>2025-11-19T17:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb65517c76c131de7a3f772beea02347279ab6a3'/>
<id>eb65517c76c131de7a3f772beea02347279ab6a3</id>
<content type='text'>
The "malloc" attribute restricts the possible function signatures to the
ones returning a pointer, which is not the case for some non-standard
allocation function variants. For example, P0901R11 proposed ::operator
new overloads that return a return_size_t result - a struct that
contains a pointer to the allocated memory as well as the actual size of
the allocated memory. Another example is __size_returning_new.

Introduce a new "malloc_span" attribute that exhibits similar semantics,
but applies to functions returning records where one member is a pointer
(assumed to point to the allocated memory) and another is an integer
(assumed to be the size of the allocated memory). This is the case for
return_size_t as well as std::span, should it be returned from such an
annotated function.

An alternative approach would be to relax the restrictions of the
existing "malloc" attribute to be applied to both functions returning
pointers and functions returning span-like structs. However, it would
complicate the user-space code by requiring specific Clang version
checks. In contrast, the presence of a new attribute can be
straightforwardly verified via the __has_attribute macro. Introducing a
new attribute also avoids concerns about the potential incompatibility
with GCC's "malloc" semantics.

In future commits, codegen can be improved to recognize the noalias-ness
of the pointer returned inside a span-like struct.

This change helps unlock the alloc token instrumentation for such
non-standard allocation functions:

https://clang.llvm.org/docs/AllocToken.html#instrumenting-non-standard-allocation-functions</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "malloc" attribute restricts the possible function signatures to the
ones returning a pointer, which is not the case for some non-standard
allocation function variants. For example, P0901R11 proposed ::operator
new overloads that return a return_size_t result - a struct that
contains a pointer to the allocated memory as well as the actual size of
the allocated memory. Another example is __size_returning_new.

Introduce a new "malloc_span" attribute that exhibits similar semantics,
but applies to functions returning records where one member is a pointer
(assumed to point to the allocated memory) and another is an integer
(assumed to be the size of the allocated memory). This is the case for
return_size_t as well as std::span, should it be returned from such an
annotated function.

An alternative approach would be to relax the restrictions of the
existing "malloc" attribute to be applied to both functions returning
pointers and functions returning span-like structs. However, it would
complicate the user-space code by requiring specific Clang version
checks. In contrast, the presence of a new attribute can be
straightforwardly verified via the __has_attribute macro. Introducing a
new attribute also avoids concerns about the potential incompatibility
with GCC's "malloc" semantics.

In future commits, codegen can be improved to recognize the noalias-ness
of the pointer returned inside a span-like struct.

This change helps unlock the alloc token instrumentation for such
non-standard allocation functions:

https://clang.llvm.org/docs/AllocToken.html#instrumenting-non-standard-allocation-functions</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] suppress -Wmissing-noreturn for virtual methods with throw-only bodies (#167523)</title>
<updated>2025-11-19T15:35:47+00:00</updated>
<author>
<name>Oleksandr T.</name>
<email>oleksandr.tarasiuk@outlook.com</email>
</author>
<published>2025-11-19T15:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=93d759ce5a63cf74882087bad020825764043381'/>
<id>93d759ce5a63cf74882087bad020825764043381</id>
<content type='text'>
Fixes #167247

--- 

This PR addresses a case where Clang emitted `-Wmissing-noreturn` for
virtual methods whose body consists of a `throw` expression

```cpp
struct Base {
  virtual void foo() {
    throw std::runtime_error("error");
  }
};
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #167247

--- 

This PR addresses a case where Clang emitted `-Wmissing-noreturn` for
virtual methods whose body consists of a `throw` expression

```cpp
struct Base {
  virtual void foo() {
    throw std::runtime_error("error");
  }
};
```</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Fix cleanup attribute by delaying type checks after the type is deduced (#164440)</title>
<updated>2025-11-18T12:36:51+00:00</updated>
<author>
<name>Guillot Tony</name>
<email>tony.guillot@protonmail.com</email>
</author>
<published>2025-11-18T12:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=22a2cae5d6735a510b17859848b14f60d2e5cdfa'/>
<id>22a2cae5d6735a510b17859848b14f60d2e5cdfa</id>
<content type='text'>
Previously, the handling of the `cleanup` attribute had some checks
based on the type, but we were deducing the type after handling the
attribute.
This PR fixes the way the are dealing with type checks for the `cleanup`
attribute by delaying these checks after we are deducing the type.

It is also fixed in a way that the solution can be adapted for other
attributes that does some type based checks.
This is the list of C/C++ attributes that are doing type based checks
and will need to be fixed in additional PRs:
- CUDAShared
- MutualExclusions
- PassObjectSize
- InitPriority
- Sentinel
- AcquireCapability
- RequiresCapability
- LocksExcluded
- AcquireHandle

NB: Some attributes could have been missed in my shallow search.

Fixes #129631</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the handling of the `cleanup` attribute had some checks
based on the type, but we were deducing the type after handling the
attribute.
This PR fixes the way the are dealing with type checks for the `cleanup`
attribute by delaying these checks after we are deducing the type.

It is also fixed in a way that the solution can be adapted for other
attributes that does some type based checks.
This is the list of C/C++ attributes that are doing type based checks
and will need to be fixed in additional PRs:
- CUDAShared
- MutualExclusions
- PassObjectSize
- InitPriority
- Sentinel
- AcquireCapability
- RequiresCapability
- LocksExcluded
- AcquireHandle

NB: Some attributes could have been missed in my shallow search.

Fixes #129631</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Add __builtin_bswapg (#162433)</title>
<updated>2025-11-15T20:27:38+00:00</updated>
<author>
<name>clf</name>
<email>53817093+clingfei@users.noreply.github.com</email>
</author>
<published>2025-11-15T20:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f210fc1a1ca611e9584478a50ed32011ba210c8f'/>
<id>f210fc1a1ca611e9584478a50ed32011ba210c8f</id>
<content type='text'>
Add a new builtin function __builtin_bswapg. It works on any integral
types that has a multiple of 16 bits as well as a single byte.

Closes #160266</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new builtin function __builtin_bswapg. It works on any integral
types that has a multiple of 16 bits as well as a single byte.

Closes #160266</pre>
</div>
</content>
</entry>
</feed>
