Skip to content

Commit de81a63

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project
2 parents 4255cdd + f8b5f86 commit de81a63

File tree

422 files changed

+13627
-8570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

422 files changed

+13627
-8570
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
applyTo: llvm/**/*
3+
---
4+
15
When performing a code review, pay close attention to code modifying a function's
26
control flow. Could the change result in the corruption of performance profile
37
data? Could the change result in invalid debug information, in particular for

.github/workflows/release-binaries-all.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ jobs:
9090
runs-on:
9191
- ubuntu-22.04
9292
- ubuntu-22.04-arm
93-
- macos-13
9493
- macos-14
9594

9695
uses: ./.github/workflows/release-binaries.yml

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ on:
2121
options:
2222
- ubuntu-22.04
2323
- ubuntu-22.04-arm
24-
- macos-13
2524
- macos-14
2625

2726
workflow_call:
@@ -130,8 +129,6 @@ jobs:
130129
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
131130
if [ "$RUNNER_ARCH" = "ARM64" ]; then
132131
arches=arm64
133-
else
134-
arches=x86_64
135132
fi
136133
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
137134
fi
@@ -147,14 +144,6 @@ jobs:
147144
build_runs_on="depot-${{ inputs.runs-on }}-16"
148145
test_runs_on=$build_runs_on
149146
;;
150-
macos-13)
151-
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
152-
build_runs_on="${{ inputs.runs-on }}"
153-
else
154-
build_runs_on="macos-13-large"
155-
fi
156-
test_runs_on="${{ inputs.runs-on }}"
157-
;;
158147
macos-14)
159148
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
160149
build_runs_on="${{ inputs.runs-on }}"

clang/AreaTeamMembers.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ [email protected] (email), rnk (Discourse), rnk (GitHub), rnk (Discord)
1313
Other Members
1414
-------------
1515
Eli Friedman
16-
efriedma@quicinc.com> (email), efriedma-quic (Discourse), efriedma-quic (GitHub)
16+
efriedma@qti.qualcomm.com> (email), efriedma-quic (Discourse), efriedma-quic (GitHub)
1717

clang/Maintainers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Clang LLVM IR generation
4646
| rjmccall\@apple.com (email), rjmccall (Phabricator), rjmccall (GitHub)
4747
4848
| Eli Friedman
49-
| efriedma\@quicinc.com (email), efriedma (Phabricator), efriedma-quic (GitHub)
49+
| efriedma\@qti.qualcomm.com (email), efriedma (Phabricator), efriedma-quic (GitHub)
5050
5151
| Anton Korobeynikov
5252
| anton\@korobeynikov.info (email), asl (Phabricator), asl (GitHub)

clang/bindings/python/clang/cindex.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,13 @@ def get_bitfield_width(self) -> int:
23622362
"""
23632363
return conf.lib.clang_getFieldDeclBitWidth(self) # type: ignore [no-any-return]
23642364

2365+
@cursor_null_guard
2366+
def is_function_inlined(self) -> bool:
2367+
"""
2368+
Check if the function is inlined.
2369+
"""
2370+
return bool(conf.lib.clang_Cursor_isFunctionInlined(self))
2371+
23652372
@cursor_null_guard
23662373
def has_attrs(self) -> bool:
23672374
"""
@@ -4310,6 +4317,7 @@ def set_property(self, property, value):
43104317
("clang_Cursor_isAnonymous", [Cursor], bool),
43114318
("clang_Cursor_isAnonymousRecordDecl", [Cursor], bool),
43124319
("clang_Cursor_isBitField", [Cursor], bool),
4320+
("clang_Cursor_isFunctionInlined", [Cursor], c_uint),
43134321
("clang_Location_isInSystemHeader", [SourceLocation], bool),
43144322
("clang_PrintingPolicy_dispose", [PrintingPolicy]),
43154323
("clang_PrintingPolicy_getProperty", [PrintingPolicy, c_int], c_uint),

clang/bindings/python/tests/cindex/test_cursor.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,21 @@ def test_storage_class(self):
784784
cursor = get_cursor(tu, "reg")
785785
self.assertEqual(cursor.storage_class, StorageClass.REGISTER)
786786

787+
def test_function_inlined(self):
788+
tu = get_tu(
789+
"""
790+
inline void f_inline(void);
791+
void f_noninline(void);
792+
int d_noninline;
793+
"""
794+
)
795+
cursor = get_cursor(tu, "f_inline")
796+
self.assertEqual(cursor.is_function_inlined(), True)
797+
cursor = get_cursor(tu, "f_noninline")
798+
self.assertEqual(cursor.is_function_inlined(), False)
799+
cursor = get_cursor(tu, "d_noninline")
800+
self.assertEqual(cursor.is_function_inlined(), False)
801+
787802
def test_availability(self):
788803
tu = get_tu("class A { A(A const&) = delete; };", lang="cpp")
789804

clang/docs/AMDGPUSupport.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ Predefined Macros
4949
- Defined as 1 if the CU mode is enabled and 0 if the WGP mode is enabled.
5050
* - ``__AMDGCN_UNSAFE_FP_ATOMICS__``
5151
- Defined if unsafe floating-point atomics are allowed.
52-
* - ``__AMDGCN_WAVEFRONT_SIZE__``
53-
- Defines the wavefront size. Allowed values are 32 and 64 (deprecated).
54-
* - ``__AMDGCN_WAVEFRONT_SIZE``
55-
- Alias to ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated).
5652
* - ``__HAS_FMAF__``
5753
- Defined if FMAF instruction is available (deprecated).
5854
* - ``__HAS_LDEXPF__``

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 149 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -197,57 +197,29 @@ the configuration (without a prefix: ``Auto``).
197197

198198
.. _AlignAfterOpenBracket:
199199

200-
**AlignAfterOpenBracket** (``BracketAlignmentStyle``) :versionbadge:`clang-format 3.8` :ref:`<AlignAfterOpenBracket>`
200+
**AlignAfterOpenBracket** (``Boolean``) :versionbadge:`clang-format 3.8` :ref:`<AlignAfterOpenBracket>`
201201
If ``true``, horizontally aligns arguments after an open bracket.
202202

203-
This applies to round brackets (parentheses), angle brackets and square
204-
brackets.
205-
206-
Possible values:
207-
208-
* ``BAS_Align`` (in configuration: ``Align``)
209-
Align parameters on the open bracket, e.g.:
210-
211-
.. code-block:: c++
212-
213-
someLongFunction(argument1,
214-
argument2);
215-
216-
* ``BAS_DontAlign`` (in configuration: ``DontAlign``)
217-
Don't align, instead use ``ContinuationIndentWidth``, e.g.:
218-
219-
.. code-block:: c++
220-
221-
someLongFunction(argument1,
222-
argument2);
223-
224-
* ``BAS_AlwaysBreak`` (in configuration: ``AlwaysBreak``)
225-
Always break after an open bracket, if the parameters don't fit
226-
on a single line, e.g.:
227-
228-
.. code-block:: c++
229203

230-
someLongFunction(
231-
argument1, argument2);
232-
233-
* ``BAS_BlockIndent`` (in configuration: ``BlockIndent``)
234-
Always break after an open bracket, if the parameters don't fit
235-
on a single line. Closing brackets will be placed on a new line.
236-
E.g.:
237-
238-
.. code-block:: c++
204+
.. code-block:: c++
239205

240-
someLongFunction(
241-
argument1, argument2
242-
)
206+
true: vs. false
207+
someLongFunction(argument1, someLongFunction(argument1,
208+
argument2); argument2);
243209

244210

245-
.. note::
246-
247-
This currently only applies to braced initializer lists (when
248-
``Cpp11BracedListStyle`` is not ``Block``) and parentheses.
211+
.. note::
249212

213+
As of clang-format 22 this option is a bool with the previous
214+
option of ``Align`` replaced with ``true``, ``DontAlign`` replaced
215+
with ``false``, and the options of ``AlwaysBreak`` and ``BlockIndent``
216+
replaced with ``true`` and with setting of new style options using
217+
``BreakAfterOpenBracketBracedList``, ``BreakAfterOpenBracketFunction``,
218+
``BreakAfterOpenBracketIf``, ``BreakBeforeCloseBracketBracedList``,
219+
``BreakBeforeCloseBracketFunction``, and ``BreakBeforeCloseBracketIf``.
250220

221+
This applies to round brackets (parentheses), angle brackets and square
222+
brackets.
251223

252224
.. _AlignArrayOfStructures:
253225

@@ -2746,6 +2718,67 @@ the configuration (without a prefix: ``Auto``).
27462718
@Mock
27472719
DataLoad loader;
27482720
2721+
.. _BreakAfterOpenBracketBracedList:
2722+
2723+
**BreakAfterOpenBracketBracedList** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakAfterOpenBracketBracedList>`
2724+
Force break after the left bracket of a braced initializer list (when
2725+
``Cpp11BracedListStyle`` is ``true``) when the list exceeds the column
2726+
limit.
2727+
2728+
.. code-block:: c++
2729+
2730+
true: false:
2731+
vector<int> x { vs. vector<int> x {1,
2732+
1, 2, 3} 2, 3}
2733+
2734+
.. _BreakAfterOpenBracketFunction:
2735+
2736+
**BreakAfterOpenBracketFunction** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakAfterOpenBracketFunction>`
2737+
Force break after the left parenthesis of a function (declaration,
2738+
definition, call) when the parameters exceed the column limit.
2739+
2740+
.. code-block:: c++
2741+
2742+
true: false:
2743+
foo ( vs. foo (a,
2744+
a , b) b)
2745+
2746+
.. _BreakAfterOpenBracketIf:
2747+
2748+
**BreakAfterOpenBracketIf** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakAfterOpenBracketIf>`
2749+
Force break after the left parenthesis of an if control statement
2750+
when the expression exceeds the column limit.
2751+
2752+
.. code-block:: c++
2753+
2754+
true: false:
2755+
if constexpr ( vs. if constexpr (a ||
2756+
a || b) b)
2757+
2758+
.. _BreakAfterOpenBracketLoop:
2759+
2760+
**BreakAfterOpenBracketLoop** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakAfterOpenBracketLoop>`
2761+
Force break after the left parenthesis of a loop control statement
2762+
when the expression exceeds the column limit.
2763+
2764+
.. code-block:: c++
2765+
2766+
true: false:
2767+
while ( vs. while (a &&
2768+
a && b) { b) {
2769+
2770+
.. _BreakAfterOpenBracketSwitch:
2771+
2772+
**BreakAfterOpenBracketSwitch** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakAfterOpenBracketSwitch>`
2773+
Force break after the left parenthesis of a switch control statement
2774+
when the expression exceeds the column limit.
2775+
2776+
.. code-block:: c++
2777+
2778+
true: false:
2779+
switch ( vs. switch (a +
2780+
a + b) { b) {
2781+
27492782
.. _BreakAfterReturnType:
27502783

27512784
**BreakAfterReturnType** (``ReturnTypeBreakingStyle``) :versionbadge:`clang-format 19` :ref:`<BreakAfterReturnType>`
@@ -3383,6 +3416,79 @@ the configuration (without a prefix: ``Auto``).
33833416

33843417

33853418

3419+
.. _BreakBeforeCloseBracketBracedList:
3420+
3421+
**BreakBeforeCloseBracketBracedList** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakBeforeCloseBracketBracedList>`
3422+
Force break before the right bracket of a braced initializer list (when
3423+
``Cpp11BracedListStyle`` is ``true``) when the list exceeds the column
3424+
limit. The break before the right bracket is only made if there is a
3425+
break after the opening bracket.
3426+
3427+
.. code-block:: c++
3428+
3429+
true: false:
3430+
vector<int> x { vs. vector<int> x {
3431+
1, 2, 3 1, 2, 3}
3432+
}
3433+
3434+
.. _BreakBeforeCloseBracketFunction:
3435+
3436+
**BreakBeforeCloseBracketFunction** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakBeforeCloseBracketFunction>`
3437+
Force break before the right parenthesis of a function (declaration,
3438+
definition, call) when the parameters exceed the column limit.
3439+
3440+
.. code-block:: c++
3441+
3442+
true: false:
3443+
foo ( vs. foo (
3444+
a , b a , b)
3445+
)
3446+
3447+
.. _BreakBeforeCloseBracketIf:
3448+
3449+
**BreakBeforeCloseBracketIf** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakBeforeCloseBracketIf>`
3450+
Force break before the right parenthesis of an if control statement
3451+
when the expression exceeds the column limit. The break before the
3452+
closing parenthesis is only made if there is a break after the opening
3453+
parenthesis.
3454+
3455+
.. code-block:: c++
3456+
3457+
true: false:
3458+
if constexpr ( vs. if constexpr (
3459+
a || b a || b )
3460+
)
3461+
3462+
.. _BreakBeforeCloseBracketLoop:
3463+
3464+
**BreakBeforeCloseBracketLoop** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakBeforeCloseBracketLoop>`
3465+
Force break before the right parenthesis of a loop control statement
3466+
when the expression exceeds the column limit. The break before the
3467+
closing parenthesis is only made if there is a break after the opening
3468+
parenthesis.
3469+
3470+
.. code-block:: c++
3471+
3472+
true: false:
3473+
while ( vs. while (
3474+
a && b a && b) {
3475+
) {
3476+
3477+
.. _BreakBeforeCloseBracketSwitch:
3478+
3479+
**BreakBeforeCloseBracketSwitch** (``Boolean``) :versionbadge:`clang-format 22` :ref:`<BreakBeforeCloseBracketSwitch>`
3480+
Force break before the right parenthesis of a switch control statement
3481+
when the expression exceeds the column limit. The break before the
3482+
closing parenthesis is only made if there is a break after the opening
3483+
parenthesis.
3484+
3485+
.. code-block:: c++
3486+
3487+
true: false:
3488+
switch ( vs. switch (
3489+
a + b a + b) {
3490+
) {
3491+
33863492
.. _BreakBeforeConceptDeclarations:
33873493

33883494
**BreakBeforeConceptDeclarations** (``BreakBeforeConceptDeclarationsStyle``) :versionbadge:`clang-format 12` :ref:`<BreakBeforeConceptDeclarations>`

clang/docs/HIPSupport.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ Predefined Macros
180180
- Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated.
181181

182182
Note that some architecture specific AMDGPU macros will have default values when
183-
used from the HIP host compilation. Other :doc:`AMDGPU macros <AMDGPUSupport>`
184-
like ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated) will default to 64 for example.
183+
used from the HIP host compilation.
185184

186185
Compilation Modes
187186
=================

0 commit comments

Comments
 (0)