Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
bdcaa00
[AArch64] match TRN starting from undef elements (#167955)
ginsbach Nov 19, 2025
dce6002
[Clang][Codegen] Move floating point math intrinsic check to separate…
HendrikHuebner Nov 19, 2025
655662e
[MLIR][ODS] Fully qualify namespace for mlir::Attribute in ODS genera…
BogdanDragosV Nov 19, 2025
6fc48de
[AArch64] Update zero latency instructions in Neoverse scheduling tab…
simonwallis2 Nov 19, 2025
68d2ce8
[DA] Replace delinearization for fixed size array (#161822)
kasuga-fj Nov 19, 2025
a2ddb02
[LoopInterchange] Don't consider loops with BTC=0 (#167113)
sjoerdmeijer Nov 19, 2025
7fe3564
[Clang] Gut the libc wrapper headers and simplify (#168438)
jhuber6 Nov 19, 2025
9eee396
[flang] "Almost NFC" changes to fir::runtime::genCharCompare() (#168563)
eugeneepshteyn Nov 19, 2025
5da0445
[LV] Consolidate shouldOptimizeForSize and remove unused BFI/PSI. NFC…
lukel97 Nov 19, 2025
7b8eee6
[RISCV][test] Add sincos-expansion.ll test case
asb Nov 19, 2025
2fc42c7
[HLSL] Add initial support for output semantics (#168095)
Keenuts Nov 19, 2025
48dca1e
[OpenACC][CIR] Implement 'atomic capture' lowering (#168422)
erichkeane Nov 19, 2025
ad31e11
[libc++] Make views::iota aware of __int128 (#167869)
philnik777 Nov 19, 2025
a7ba8dc
[clang-tidy][docs][NFC] Enforce 80 characters limit (4/4) (#168049)
zeyi2 Nov 19, 2025
93a1327
[lldb] Skip TestLibcxxInternalsRecognizer on asan + MacOS
felipepiovezan Nov 19, 2025
1723a51
[mlir][tensor] Drop unused AffineExpr variable (NFC) (#168651)
CoTinker Nov 19, 2025
c62fc06
[asan] Implement address sanitizer on AIX: platform support (#139587)
jakeegan Nov 19, 2025
71e3de8
[mlir][vector] Missing indices on vectorization of 1-d reduction to 1…
simpel01 Nov 19, 2025
b11b7b3
[clang][analyzer] Add defer_lock_t modelling to BlockInCriticalSectio…
gamesh411 Nov 19, 2025
b79a665
[AMDGPU] Remove leftover implicit operands from SI_SPILL/SI_RESTORE. …
LU-JOHN Nov 19, 2025
86a82f2
[MLIR][Python] make sure stubs get installed with LLVM_DISTRIBUTION_C…
makslevental Nov 19, 2025
9cd40da
[flang][NFC] Strip trailing whitespace from tests (7 of N)
tarunprabhu Nov 19, 2025
7a39236
[ASan] Fix interface_symbols_darwin.cpp on internal shell
boomanaiden154 Nov 19, 2025
c2b4e48
[libLTO] add thinlto caching flags to libLTO (#168567)
w2yehia Nov 19, 2025
30e5f76
[llvm] Construct iterator_range with the conversion constructor (NFC)…
kazutakahirata Nov 19, 2025
19129ea
[llvm] Use llvm::size (NFC) (#168675)
kazutakahirata Nov 19, 2025
139f726
[NFC][TableGen] Add IfGuardEmitter and adopt it in InstrInfoEmitter (…
jurahul Nov 19, 2025
4703195
[NFC][LLVM] Namespace cleanup in SLPVectorizer (#168623)
jurahul Nov 19, 2025
4f3d68a
[NFC][MC] Namespace cleanup in MC (#168627)
jurahul Nov 19, 2025
93d759c
[Clang] suppress -Wmissing-noreturn for virtual methods with throw-on…
a-tarasyuk Nov 19, 2025
4353845
[AArch64][GlobalISel] Added support for hadd family of intrinsics (#1…
JoshdRod Nov 19, 2025
80d327e
[Hexagon] Enable soft bf16 in hexagon (#167924)
fhossein-quic Nov 19, 2025
f3d8a5c
[IPT] Remove ipt.NumInstScanned statistic (#168515)
lukel97 Nov 19, 2025
9c2bbfe
[X86] X86ISelDAGToDAG - don't let ADD/SUB(X,1) -> SUB/ADD(X,-1) const…
RKSimon Nov 19, 2025
c9e22d3
[lldb][windows] add color to the Python.dll not found error (#168718)
charles-zablit Nov 19, 2025
c6775e2
[compiler-rt] [libFuzzer] Fix merge-posix test (again) (#168639)
ndrewh Nov 19, 2025
5c73fed
[ObjectYAML][CodeView] Include inline annotation data (#168211)
Nerixyz Nov 19, 2025
1d474e4
[llvm-cov] Use a range-based for loop (NFC) (#168671)
kazutakahirata Nov 19, 2025
b78824a
[llvm-profdata] Use a range-based for loop (NFC) (#168672)
kazutakahirata Nov 19, 2025
c2445d9
[Support] Use StringMap::contains (NFC) (#168673)
kazutakahirata Nov 19, 2025
d988991
[flang] Tokenize all -D macro bodies, and do it better (#168116)
klausler Nov 19, 2025
f5f6ca6
[flang] Fix crash in UseErrorDetails construction case (#168126)
klausler Nov 19, 2025
a55e30b
[flang][runtime] Control stream truncation via runtime environment (#…
klausler Nov 19, 2025
2f6f045
[mlir][LLVM] Resync memory effect attribute with LLVM IR (#168568)
darkbuck Nov 19, 2025
eb65517
[Clang] Introduce malloc_span attribute (#167010)
a-nogikh Nov 19, 2025
c41f642
[ASan] Make dyld_insert_libraries_reexec work with internal shell
boomanaiden154 Nov 19, 2025
e6fc654
[HLSL] replace std::unordered_map with DenseMap (#168739)
Keenuts Nov 19, 2025
8f91d9f
[cross-project-tests][DebugInfo] Make simplified-template-names test …
Michael137 Nov 19, 2025
e9b11ae
[ASan] Make duplicate_os_log_reports.cpp work with the internal shell
boomanaiden154 Nov 19, 2025
0b921f5
DAG: Use poison when splitting vector_shuffle results (#168176)
arsenm Nov 19, 2025
1782e50
DAG: Reorder SDPatternMatch combinators earlier (#168625)
arsenm Nov 19, 2025
ed0c36c
[Fuzzer] make big-file-copy.test work with the internal shell (#168658)
boomanaiden154 Nov 19, 2025
36cbcec
[CIR] Ternary with const cond and throw in the live part (#168432)
AmrDeveloper Nov 19, 2025
009ec6f
[CIR] Upstream Exception EhInflight op (#165621)
AmrDeveloper Nov 19, 2025
f65294e
Add test case for xsgetn in basic_filebuf (#167937)
Sterling-Augustine Nov 19, 2025
87a1fd1
[gn] "port" 5efce7392f3f (arm 32-bit asm compiler-rt)
nico Nov 19, 2025
6ad1623
[tosa] : Enhance EqualizeRanks to handle dynamic dimensions. (#168564)
sahas3 Nov 19, 2025
8bfd294
[libc++] Remove is_signed<T> use from <limits> (#168334)
philnik777 Nov 19, 2025
449807a
[gn] port c62fc065b4c1
nico Nov 19, 2025
0c7d826
[NFC][lldb] move DiagnosticsRendering to Host (#168696)
charles-zablit Nov 19, 2025
3890a4a
[RISCV] Update X60 ReleaseAtCycles for Vector Integer Arithmetic Inst…
mikhailramalho Nov 19, 2025
8ab7b60
[Github] Bump Runner Version in CI Containers
boomanaiden154 Nov 19, 2025
0f615dc
[Github] Make metrics container build use common actions (#168667)
boomanaiden154 Nov 19, 2025
6f8e87b
[gn] port 22a2cae5d6735 (AttrIsTypeDependent.inc)
nico Nov 19, 2025
a4456a5
[bazel] Flip --enable_bzlmod to true (#168555)
rupprecht Nov 19, 2025
ecd0f61
merge main into amd-staging
ronlieb Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 15 additions & 37 deletions .github/workflows/build-metrics-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,19 @@ jobs:
build-metrics-container:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
outputs:
container-name: ${{ steps.vars.outputs.container-name }}
container-name-tag: ${{ steps.vars.outputs.container-name-tag }}
container-filename: ${{ steps.vars.outputs.container-filename }}
steps:
- name: Checkout LLVM
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
sparse-checkout: .ci/metrics/
- name: Write Variables
id: vars
run: |
tag=`date +%s`
container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/metrics"
echo "container-name=$container_name" >> $GITHUB_OUTPUT
echo "container-name-tag=$container_name:$tag" >> $GITHUB_OUTPUT
echo "container-filename=$(echo $container_name:$tag | sed -e 's/\//-/g' -e 's/:/-/g').tar" >> $GITHUB_OUTPUT
sparse-checkout: |
.ci/metrics/
.github/actions/build-container
- name: Build Container
working-directory: ./.ci/metrics
run: |
podman build -t ${{ steps.vars.outputs.container-name-tag }} -f Dockerfile .
# Save the container so we have it in case the push fails. This also
# allows us to separate the push step into a different job so we can
# maintain minimal permissions while building the container.
- name: Save Container Image
run: |
podman save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
- name: Upload Container Image
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: ./.github/actions/build-container
with:
name: container
path: ${{ steps.vars.outputs.container-filename }}
retention-days: 14
container-name: metrics
context: .ci/metrics
dockerfile: .ci/metrics/Dockerfile

push-metrics-container:
if: github.event_name == 'push'
Expand All @@ -65,14 +45,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Download Container
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- name: Checkout LLVM
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
sparse-checkout: |
.github/actions/push-container

- uses: ./.github/actions/push-container
with:
name: container
- name: Push Container
run: |
podman load -i ${{ needs.build-metrics-container.outputs.container-filename }}
podman tag ${{ needs.build-metrics-container.outputs.container-name-tag }} ${{ needs.build-metrics-container.outputs.container-name }}:latest
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
podman push ${{ needs.build-metrics-container.outputs.container-name-tag }}
podman push ${{ needs.build-metrics-container.outputs.container-name }}:latest
token: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN powershell -Command \
RUN git config --system core.longpaths true & \
git config --global core.autocrlf false

ARG RUNNER_VERSION=2.329.0
ARG RUNNER_VERSION=2.330.0
ENV RUNNER_VERSION=$RUNNER_VERSION

RUN powershell -Command \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ WORKDIR /home/gha

FROM ci-container AS ci-container-agent

ENV GITHUB_RUNNER_VERSION=2.329.0
ENV GITHUB_RUNNER_VERSION=2.330.0

RUN mkdir actions-runner && \
cd actions-runner && \
Expand Down
7 changes: 4 additions & 3 deletions clang-tools-extra/docs/clang-tidy/checks/mpi/buffer-deref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ mpi-buffer-deref

This check verifies if a buffer passed to an MPI (Message Passing Interface)
function is sufficiently dereferenced. Buffers should be passed as a single
pointer or array. As MPI function signatures specify ``void *`` for their buffer
types, insufficiently dereferenced buffers can be passed, like for example as
double pointers or multidimensional arrays, without a compiler warning emitted.
pointer or array. As MPI function signatures specify ``void *`` for their
buffer types, insufficiently dereferenced buffers can be passed, like for
example as double pointers or multidimensional arrays, without a compiler
warning emitted.

Examples:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
mpi-type-mismatch
=================

This check verifies if buffer type and MPI (Message Passing Interface) datatype
pairs match for used MPI functions. All MPI datatypes defined by the MPI
standard (3.1) are verified by this check. User defined typedefs, custom MPI
datatypes and null pointer constants are skipped, in the course of verification.
This check verifies if buffer type and MPI (Message Passing Interface)
datatype pairs match for used MPI functions. All MPI datatypes defined
by the MPI standard (3.1) are verified by this check. User defined typedefs,
custom MPI datatypes and null pointer constants are skipped, in the course
of verification.

Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
objc-forbidden-subclassing
==========================

Finds Objective-C classes which are subclasses of classes which are not designed
to be subclassed.
Finds Objective-C classes which are subclasses of classes which are
not designed to be subclassed.

By default, includes a list of Objective-C classes which are publicly documented
as not supporting subclassing.
By default, includes a list of Objective-C classes which are publicly
documented as not supporting subclassing.

.. note::

Expand Down
68 changes: 45 additions & 23 deletions clang-tools-extra/docs/clang-tidy/checks/objc/nsdate-formatter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,93 @@
objc-nsdate-formatter
=====================

When ``NSDateFormatter`` is used to convert an ``NSDate`` type to a ``String`` type, the user
can specify a custom format string. Certain format specifiers are undesirable
despite being legal. See http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns for all legal date patterns.
When ``NSDateFormatter`` is used to convert an ``NSDate`` type to a ``String``
type, the user can specify a custom format string. Certain format specifiers
are undesirable despite being legal.
See http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
for all legal date patterns.

This checker reports as warnings the following string patterns in a date format specifier:
This checker reports as warnings the following string patterns in a date
format specifier:

#. yyyy + ww : Calendar year specified with week of a week year (unless YYYY is also specified).
#. yyyy + ww : Calendar year specified with week of a week year
(unless YYYY is also specified).

* | **Example 1:** Input Date: `29 December 2014` ; Format String: `yyyy-ww`;
* | **Example 1:** Input Date: `29 December 2014` ;
| Format String: `yyyy-ww`;
| Output string: `2014-01` (Wrong because it’s not the first week of 2014)

* | **Example 2:** Input Date: `29 December 2014` ; Format String: `dd-MM-yyyy (ww-YYYY)`;
* | **Example 2:** Input Date: `29 December 2014` ;
| Format String: `dd-MM-yyyy (ww-YYYY)`;
| Output string: `29-12-2014 (01-2015)` (This is correct)

#. F without ee/EE : Numeric day of week in a month without actual day.

* | **Example:** Input Date: `29 December 2014` ; Format String: `F-MM`;
| Output string: `5-12` (Wrong because it reads as *5th ___ of Dec* in English)
| Output string: `5-12` (Wrong because it reads as *5th ___ of Dec* in
| English)

#. F without MM : Numeric day of week in a month without month.

* | **Example:** Input Date: `29 December 2014` ; Format String: `F-EE`
| Output string: `5-Mon` (Wrong because it reads as *5th Mon of ___* in English)
| Output string: `5-Mon` (Wrong because it reads as *5th Mon of ___* in
| English)

#. WW without MM : Week of the month without the month.

* | **Example:** Input Date: `29 December 2014` ; Format String: `WW-yyyy`
| Output string: `05-2014` (Wrong because it reads as *5th Week of ___* in English)
| Output string: `05-2014` (Wrong because it reads as *5th Week of ___* in
| English)

#. YYYY + QQ : Week year specified with quarter of normal year (unless yyyy is also specified).
#. YYYY + QQ : Week year specified with quarter of normal year
(unless yyyy is also specified).

* | **Example 1:** Input Date: `29 December 2014` ; Format String: `YYYY-QQ`
| Output string: `2015-04` (Wrong because it’s not the 4th quarter of 2015)
| Output string: `2015-04` (Wrong because it’s not the 4th quarter of
| 2015)

* | **Example 2:** Input Date: `29 December 2014` ; Format String: `ww-YYYY (QQ-yyyy)`
* | **Example 2:** Input Date: `29 December 2014` ;
| Format String: `ww-YYYY (QQ-yyyy)`
| Output string: `01-2015 (04-2014)` (This is correct)

#. YYYY + MM : Week year specified with Month of a calendar year (unless yyyy is also specified).
#. YYYY + MM : Week year specified with Month of a calendar year
(unless yyyy is also specified).

* | **Example 1:** Input Date: `29 December 2014` ; Format String: `YYYY-MM`
| Output string: `2015-12` (Wrong because it’s not the 12th month of 2015)

* | **Example 2:** Input Date: `29 December 2014` ; Format String: `ww-YYYY (MM-yyyy)`
* | **Example 2:** Input Date: `29 December 2014` ;
| Format String: `ww-YYYY (MM-yyyy)`
| Output string: `01-2015 (12-2014)` (This is correct)

#. YYYY + DD : Week year with day of a calendar year (unless yyyy is also specified).
#. YYYY + DD : Week year with day of a calendar year
(unless yyyy is also specified).

* | **Example 1:** Input Date: `29 December 2014` ; Format String: `YYYY-DD`
| Output string: `2015-363` (Wrong because it’s not the 363rd day of 2015)

* | **Example 2:** Input Date: `29 December 2014` ; Format String: `ww-YYYY (DD-yyyy)`
* | **Example 2:** Input Date: `29 December 2014` ;
| Format String: `ww-YYYY (DD-yyyy)`
| Output string: `01-2015 (363-2014)` (This is correct)

#. YYYY + WW : Week year with week of a calendar year (unless yyyy is also specified).
#. YYYY + WW : Week year with week of a calendar year
(unless yyyy is also specified).

* | **Example 1:** Input Date: `29 December 2014` ; Format String: `YYYY-WW`
| Output string: `2015-05` (Wrong because it’s not the 5th week of 2015)

* | **Example 2:** Input Date: `29 December 2014` ; Format String: `ww-YYYY (WW-MM-yyyy)`
* | **Example 2:** Input Date: `29 December 2014` ;
| Format String: `ww-YYYY (WW-MM-yyyy)`
| Output string: `01-2015 (05-12-2014)` (This is correct)

#. YYYY + F : Week year with day of week in a calendar month (unless yyyy is also specified).
#. YYYY + F : Week year with day of week in a calendar month
(unless yyyy is also specified).

* | **Example 1:** Input Date: `29 December 2014` ; Format String: `YYYY-ww-F-EE`
| Output string: `2015-01-5-Mon` (Wrong because it’s not the 5th Monday of January in 2015)
* | **Example 1:** Input Date: `29 December 2014` ;
| Format String: `YYYY-ww-F-EE`
| Output string: `2015-01-5-Mon` (Wrong because it’s not the 5th Monday of
| January in 2015)

* | **Example 2:** Input Date: `29 December 2014` ; Format String: `ww-YYYY (F-EE-MM-yyyy)`
* | **Example 2:** Input Date: `29 December 2014` ;
| Format String: `ww-YYYY (F-EE-MM-yyyy)`
| Output string: `01-2015 (5-Mon-12-2014)` (This is correct)
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The check will only fix 'CamelCase' to 'camelCase'. In some other cases we will
only provide warning messages since the property name could be complicated.
Users will need to come up with a proper name by their own.

This check also accepts special acronyms as prefixes or suffixes. Such prefixes or suffixes
will suppress the Lower Camel Case check according to the guide:
This check also accepts special acronyms as prefixes or suffixes. Such prefixes
or suffixes will suppress the Lower Camel Case check according to the guide:
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingBasics.html#//apple_ref/doc/uid/20001281-1002931-BBCFHEAB

For a full list of well-known acronyms:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Diagnoses every integer to pointer cast.

While casting an (integral) pointer to an integer is obvious - you just get
the integral value of the pointer, casting an integer to an (integral) pointer
is deceivingly different. While you will get a pointer with that integral value,
if you got that integral value via a pointer-to-integer cast originally,
is deceivingly different. While you will get a pointer with that integral
value, if you got that integral value via a pointer-to-integer cast originally,
the new pointer will lack the provenance information from the original pointer.

So while (integral) pointer to integer casts are effectively no-ops,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
performance-noexcept-swap
=========================

The check flags user-defined swap and iter_swap functions not marked with ``noexcept`` or
marked with ``noexcept(expr)`` where ``expr`` evaluates to ``false``
(but is not a ``false`` literal itself).
The check flags user-defined swap and iter_swap functions not marked with
``noexcept`` or marked with ``noexcept(expr)`` where ``expr`` evaluates to
``false`` (but is not a ``false`` literal itself).

When a swap or iter_swap function is marked as ``noexcept``, it assures the compiler that
no exceptions will be thrown during the swapping of two objects, which allows
the compiler to perform certain optimizations such as omitting exception
handling code.
When a swap or iter_swap function is marked as ``noexcept``, it assures the
compiler that no exceptions will be thrown during the swapping of two objects,
which allows the compiler to perform certain optimizations such as omitting
exception handling code.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const reference.

The check is only applied if it is safe to replace the copy by a const
reference. This is the case when the variable is const qualified or when it is
only used as a const, i.e. only const methods or operators are invoked on it, or
it is used as const reference or value argument in constructors or function
only used as a const, i.e. only const methods or operators are invoked on it,
or it is used as const reference or value argument in constructors or function
calls.

Example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ objects.
Otherwise, it just complains the intrinsics are non-portable (and there are
`P0214`_ alternatives).

Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX,
ARM NEON). It is common that SIMD code implementing the same algorithm, is
written in multiple target-dispatching pieces to optimize for different
architectures or micro-architectures.
Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power
AltiVec/VSX, ARM NEON). It is common that SIMD code implementing the same
algorithm, is written in multiple target-dispatching pieces to optimize for
different architectures or micro-architectures.

The C++ standard proposal `P0214`_ and its extensions cover many common SIMD
operations. By migrating from target-dependent intrinsics to `P0214`_
operations, the SIMD code can be simplified and pieces for different targets can
be unified.
operations, the SIMD code can be simplified and pieces for different targets
can be unified.

Refer to `P0214`_ for introduction and motivation for the data-parallel standard
library.
Refer to `P0214`_ for introduction and motivation for the data-parallel
standard library.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ elements). These are not allowed in standard C++, and should usually be

Per C++ ``[allocator.requirements.general]``: "T is any cv-unqualified object
type", ``std::allocator<const T>`` is undefined. Many standard containers use
``std::allocator`` by default and therefore their ``const T`` instantiations are
undefined.
``std::allocator`` by default and therefore their ``const T`` instantiations
are undefined.

libc++ defines ``std::allocator<const T>`` as an extension which will be removed
in the future.
libc++ defines ``std::allocator<const T>`` as an extension which will be
removed in the future.

libstdc++ and MSVC do not support ``std::allocator<const T>``:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
portability-template-virtual-member-function
============================================

Finds cases when an uninstantiated virtual member function in a template class causes
cross-compiler incompatibility.
Finds cases when an uninstantiated virtual member function in a template class
causes cross-compiler incompatibility.

Upon instantiating a template class, non-virtual member functions don't have to be
instantiated unless they are used. Virtual member function instantiation on the other hand
is unspecified and depends on the implementation of the compiler.
Upon instantiating a template class, non-virtual member functions don't have
to be instantiated unless they are used. Virtual member function instantiation
on the other hand is unspecified and depends on the implementation of the
compiler.

In the following snippets the virtual member function is not instantiated by GCC and Clang,
but it is instantiated by MSVC, so while the snippet is accepted by the former compilers,
it is rejected by the latter.
In the following snippets the virtual member function is not instantiated by
GCC and Clang, but it is instantiated by MSVC, so while the snippet is accepted
by the former compilers, it is rejected by the latter.

.. code:: c++

Expand All @@ -32,6 +33,7 @@ it is rejected by the latter.
return 0;
}

Cross-platform projects that need to support MSVC on Windows might see compiler errors
because certain virtual member functions are instantiated, which are not instantiated
by other compilers on other platforms. This check highlights such virtual member functions.
Cross-platform projects that need to support MSVC on Windows might see compiler
errors because certain virtual member functions are instantiated, which are not
instantiated by other compilers on other platforms. This check highlights such
virtual member functions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Initial expression Result

This check will apply to any class that has a ``contains`` method, notably
including ``std::set``, ``std::unordered_set``, ``std::map``, and
``std::unordered_map`` as of C++20, and ``std::string`` and ``std::string_view``
as of C++23.
``std::unordered_map`` as of C++20, and ``std::string`` and
``std::string_view`` as of C++23.
Loading