Skip to content

Commit a181584

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project into fix/113324-follow_up
2 parents ed851fa + 92e0fb0 commit a181584

File tree

99 files changed

+875
-393
lines changed

Some content is hidden

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

99 files changed

+875
-393
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
/clang/tools/clang-installapi/ @cyndyishida
142142

143143
# ExtractAPI
144-
/clang/**/ExtractAPI @daniel-grumberg
144+
/clang/**/ExtractAPI @daniel-grumberg @QuietMisdreavus
145145

146146
# DWARFLinker, dwarfutil, dsymutil
147147
/llvm/**/DWARFLinker/ @JDevlieghere

clang/docs/AMDGPUSupport.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Predefined Macros
5050
* - ``__AMDGCN_UNSAFE_FP_ATOMICS__``
5151
- Defined if unsafe floating-point atomics are allowed.
5252
* - ``__AMDGCN_WAVEFRONT_SIZE__``
53-
- Defines the wavefront size. Allowed values are 32 and 64 (deprecated).
53+
- Defines the wavefront size. Allowed values are 32 and 64.
5454
* - ``__AMDGCN_WAVEFRONT_SIZE``
55-
- Alias to ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated).
55+
- Alias to ``__AMDGCN_WAVEFRONT_SIZE__``. To be deprecated.
5656
* - ``__HAS_FMAF__``
5757
- Defined if FMAF instruction is available (deprecated).
5858
* - ``__HAS_LDEXPF__``

clang/docs/HIPSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Predefined Macros
178178

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

183183
Compilation Modes
184184
=================

clang/docs/LanguageExtensions.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5974,3 +5974,20 @@ Clang guarantees the following behaviors:
59745974
padding bits are initialized to zero.
59755975
59765976
Currently, the above extension only applies to C source code, not C++.
5977+
5978+
Qualified function types in C
5979+
=============================
5980+
Declaring a function with a qualified type in C is undefined behavior (C23 and
5981+
earlier) or implementation-defined behavior (C2y). Clang allows a function type
5982+
to be specified with the ``const`` and ``volatile`` qualifiers, but ignores the
5983+
qualifications.
5984+
5985+
.. code-block:: c
5986+
5987+
typedef int f(void);
5988+
const volatile f func; // Qualifier on function type has no effect.
5989+
5990+
5991+
Note, Clang does not allow an ``_Atomic`` function type because
5992+
of explicit constraints against atomically qualified (arrays and) function
5993+
types.

clang/docs/ReleaseNotes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ C2y Feature Support
298298
paper adopts Clang's existing practice, so there were no changes to compiler
299299
behavior.
300300

301+
- Updated conformance for `N3342 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3342.pdf>`_
302+
which made qualified function types implementation-defined rather than
303+
undefined. Clang has always accepted ``const`` and ``volatile`` qualified
304+
function types by ignoring the qualifiers.
305+
301306
C23 Feature Support
302307
^^^^^^^^^^^^^^^^^^^
303308

clang/include/clang/Basic/Attr.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,6 @@ def LifetimeBound : DeclOrTypeAttr {
18861886
let Spellings = [Clang<"lifetimebound", 0>];
18871887
let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>;
18881888
let Documentation = [LifetimeBoundDocs];
1889-
let LangOpts = [CPlusPlus];
18901889
let SimpleHandler = 1;
18911890
}
18921891

clang/include/clang/Basic/AttrDocs.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3858,8 +3858,7 @@ def LifetimeBoundDocs : Documentation {
38583858
The ``lifetimebound`` attribute on a function parameter or implicit object
38593859
parameter indicates that objects that are referred to by that parameter may
38603860
also be referred to by the return value of the annotated function (or, for a
3861-
parameter of a constructor, by the value of the constructed object). It is only
3862-
supported in C++.
3861+
parameter of a constructor, by the value of the constructed object).
38633862

38643863
By default, a reference is considered to refer to its referenced object, a
38653864
pointer is considered to refer to its pointee, a ``std::initializer_list<T>``

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6241,8 +6241,9 @@ def err_typecheck_negative_array_size : Error<"array size is negative">;
62416241
def warn_typecheck_function_qualifiers_ignored : Warning<
62426242
"'%0' qualifier on function type %1 has no effect">,
62436243
InGroup<IgnoredQualifiers>;
6244-
def warn_typecheck_function_qualifiers_unspecified : Warning<
6245-
"'%0' qualifier on function type %1 has unspecified behavior">;
6244+
def ext_typecheck_function_qualifiers_unspecified : ExtWarn<
6245+
"'%0' qualifier on function type %1 has no effect and is a Clang extension">,
6246+
InGroup<IgnoredQualifiers>;
62466247
def warn_typecheck_reference_qualifiers : Warning<
62476248
"'%0' qualifier on reference type %1 has no effect">,
62486249
InGroup<IgnoredReferenceQualifiers>;

clang/include/clang/Basic/MacroBuilder.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,8 @@ class MacroBuilder {
2626
MacroBuilder(raw_ostream &Output) : Out(Output) {}
2727

2828
/// Append a \#define line for macro of the form "\#define Name Value\n".
29-
/// If DeprecationMsg is provided, also append a pragma to deprecate the
30-
/// defined macro.
31-
void defineMacro(const Twine &Name, const Twine &Value = "1",
32-
Twine DeprecationMsg = "") {
29+
void defineMacro(const Twine &Name, const Twine &Value = "1") {
3330
Out << "#define " << Name << ' ' << Value << '\n';
34-
if (!DeprecationMsg.isTriviallyEmpty())
35-
Out << "#pragma clang deprecated(" << Name << ", \"" << DeprecationMsg
36-
<< "\")\n";
3731
}
3832

3933
/// Append a \#undef line for Name. Name should be of the form XXX

clang/include/clang/Basic/arm_sve.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,7 @@ let SVETargetGuard = "sve2,lut,bf16", SMETargetGuard = "sme2,lut,bf16" in {
19621962
////////////////////////////////////////////////////////////////////////////////
19631963
// SVE2 - Optional
19641964

1965-
let SVETargetGuard = "sve2-aes", SMETargetGuard = InvalidMode in {
1965+
let SVETargetGuard = "sve2,sve-aes", SMETargetGuard = InvalidMode in {
19661966
def SVAESD : SInst<"svaesd[_{d}]", "ddd", "Uc", MergeNone, "aarch64_sve_aesd", [IsOverloadNone]>;
19671967
def SVAESIMC : SInst<"svaesimc[_{d}]", "dd", "Uc", MergeNone, "aarch64_sve_aesimc", [IsOverloadNone]>;
19681968
def SVAESE : SInst<"svaese[_{d}]", "ddd", "Uc", MergeNone, "aarch64_sve_aese", [IsOverloadNone]>;

0 commit comments

Comments
 (0)