Skip to content

Commit 87b16f8

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:ddb86a378da1 into amd-gfx:05b34903b77d
Local branch amd-gfx 05b3490 Merged main:3a44223711ec into amd-gfx:b4257a3b0e76 Remote branch main ddb86a3 [mlir][sparse] removed unused using clauses in support lib (llvm#68148)
2 parents 05b3490 + ddb86a3 commit 87b16f8

File tree

57 files changed

+1722
-359
lines changed

Some content is hidden

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

57 files changed

+1722
-359
lines changed

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
matrix:
6969
target:
7070
- triple: x86_64-linux-gnu-ubuntu-22.04
71-
runs-on: ubuntu-22.04-8x32
71+
runs-on: ubuntu-22.04-16x64
7272
debian-build-deps: >
7373
chrpath
7474
gcc-multilib

clang/docs/ReleaseNotes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ Improvements to Clang's diagnostics
216216
- The fix-it emitted by ``-Wformat`` for scoped enumerations now take the
217217
enumeration's underlying type into account instead of suggesting a type just
218218
based on the format string specifier being used.
219+
- Clang now displays an improved diagnostic and a note when a defaulted special
220+
member is marked ``constexpr`` in a class with a virtual base class
221+
(`#64843: <https://github.com/llvm/llvm-project/issues/64843>`_).
219222

220223
Bug Fixes in This Version
221224
-------------------------
@@ -410,6 +413,8 @@ Miscellaneous Clang Crashes Fixed
410413
`Issue 64065 <https://github.com/llvm/llvm-project/issues/64065>`_
411414
- Fixed a crash when check array access on zero-length element.
412415
`Issue 64564 <https://github.com/llvm/llvm-project/issues/64564>`_
416+
- Fixed a crash when an ObjC ivar has an invalid type. See
417+
(`#68001 <https://github.com/llvm/llvm-project/pull/68001>`_)
413418

414419
Target Specific Changes
415420
-----------------------

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9454,6 +9454,8 @@ def err_defaulted_copy_assign_not_ref : Error<
94549454
def err_incorrect_defaulted_constexpr : Error<
94559455
"defaulted definition of %sub{select_special_member_kind}0 "
94569456
"is not constexpr">;
9457+
def err_incorrect_defaulted_constexpr_with_vb: Error<
9458+
"%sub{select_special_member_kind}0 cannot be 'constexpr' in a class with virtual base class">;
94579459
def err_incorrect_defaulted_consteval : Error<
94589460
"defaulted declaration of %sub{select_special_member_kind}0 "
94599461
"cannot be consteval because implicit definition is not constexpr">;

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,12 +927,12 @@ ASTContext::ASTContext(LangOptions &LOpts, SourceManager &SM,
927927
: ConstantArrayTypes(this_(), ConstantArrayTypesLog2InitSize),
928928
DependentSizedArrayTypes(this_()), DependentSizedExtVectorTypes(this_()),
929929
DependentAddressSpaceTypes(this_()), DependentVectorTypes(this_()),
930-
DependentSizedMatrixTypes(this_()), DependentTypeOfExprTypes(this_()),
931-
DependentDecltypeTypes(this_()), DependentBitIntTypes(this_()),
930+
DependentSizedMatrixTypes(this_()),
932931
FunctionProtoTypes(this_(), FunctionProtoTypesLog2InitSize),
932+
DependentTypeOfExprTypes(this_()), DependentDecltypeTypes(this_()),
933933
TemplateSpecializationTypes(this_()),
934934
DependentTemplateSpecializationTypes(this_()), AutoTypes(this_()),
935-
SubstTemplateTemplateParmPacks(this_()),
935+
DependentBitIntTypes(this_()), SubstTemplateTemplateParmPacks(this_()),
936936
CanonTemplateTemplateParms(this_()), SourceMgr(SM), LangOpts(LOpts),
937937
NoSanitizeL(new NoSanitizeList(LangOpts.NoSanitizeFiles, SM)),
938938
XRayFilter(new XRayFunctionFilter(LangOpts.XRayAlwaysInstrumentFiles,

clang/lib/Basic/Module.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,9 @@ bool Module::directlyUses(const Module *Requested) {
299299
if (Requested->isSubModuleOf(Use))
300300
return true;
301301

302-
// Anyone is allowed to use our builtin stddef.h and its accompanying module.
303-
if (!Requested->Parent && Requested->Name == "_Builtin_stddef_max_align_t")
302+
// Anyone is allowed to use our builtin stdarg.h and stddef.h and their
303+
// accompanying modules.
304+
if (!Requested->Parent && (Requested->Name == "_Builtin_stdarg" || Requested->Name == "_Builtin_stddef"))
304305
return true;
305306

306307
if (NoUndeclaredIncludes)

clang/lib/Headers/__stddef_max_align_t.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
1+
/*===---- __stddef_max_align_t.h - Definition of max_align_t ---------------===
22
*
33
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
* See https://llvm.org/LICENSE.txt for license information.

clang/lib/Headers/__stddef_null.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10+
#if !defined(NULL) || !__has_feature(modules)
11+
12+
/* linux/stddef.h will define NULL to 0. glibc (and other) headers then define
13+
* __need_NULL and rely on stddef.h to redefine NULL to the correct value again.
14+
* Modules don't support redefining macros like that, but support that pattern
15+
* in the non-modules case.
16+
*/
1017
#undef NULL
18+
1119
#ifdef __cplusplus
1220
#if !defined(__MINGW32__) && !defined(_MSC_VER)
1321
#define NULL __null
@@ -17,3 +25,5 @@
1725
#else
1826
#define NULL ((void*)0)
1927
#endif
28+
29+
#endif

clang/lib/Headers/__stddef_nullptr_t.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
#if !defined(_NULLPTR_T) || __has_feature(modules)
11-
/* Always define nullptr_t when modules are available. */
12-
#if !__has_feature(modules)
10+
#ifndef _NULLPTR_T
1311
#define _NULLPTR_T
14-
#endif
12+
1513
#ifdef __cplusplus
1614
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
1715
namespace std {
1816
typedef decltype(nullptr) nullptr_t;
1917
}
2018
using ::std::nullptr_t;
2119
#endif
22-
#else
20+
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
2321
typedef typeof(nullptr) nullptr_t;
2422
#endif
23+
2524
#endif

clang/lib/Headers/__stddef_offsetof.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
#if !defined(offsetof) || __has_feature(modules)
11-
/* Always define offsetof when modules are available. */
10+
#ifndef offsetof
1211
#define offsetof(t, d) __builtin_offsetof(t, d)
1312
#endif

clang/lib/Headers/__stddef_ptrdiff_t.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
#if !defined(_PTRDIFF_T) || __has_feature(modules)
11-
/* Always define ptrdiff_t when modules are available. */
12-
#if !__has_feature(modules)
10+
#ifndef _PTRDIFF_T
1311
#define _PTRDIFF_T
14-
#endif
12+
1513
typedef __PTRDIFF_TYPE__ ptrdiff_t;
14+
1615
#endif

clang/lib/Headers/__stddef_rsize_t.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
#if !defined(_RSIZE_T) || __has_feature(modules)
11-
/* Always define rsize_t when modules are available. */
12-
#if !__has_feature(modules)
10+
#ifndef _RSIZE_T
1311
#define _RSIZE_T
14-
#endif
12+
1513
typedef __SIZE_TYPE__ rsize_t;
14+
1615
#endif

clang/lib/Headers/__stddef_size_t.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
#if !defined(_SIZE_T) || __has_feature(modules)
11-
/* Always define size_t when modules are available. */
12-
#if !__has_feature(modules)
10+
#ifndef _SIZE_T
1311
#define _SIZE_T
14-
#endif
12+
1513
typedef __SIZE_TYPE__ size_t;
14+
1615
#endif

clang/lib/Headers/__stddef_unreachable.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
#if !defined(unreachable) || __has_feature(modules)
11-
/* Always define unreachable when modules are available. */
10+
#ifndef unreachable
1211
#define unreachable() __builtin_unreachable()
1312
#endif

clang/lib/Headers/__stddef_wchar_t.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
*/
99

1010
#if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED)
11-
/* Always define wchar_t when modules are available. */
12-
#if !defined(_WCHAR_T) || __has_feature(modules)
13-
#if !__has_feature(modules)
11+
12+
#ifndef _WCHAR_T
1413
#define _WCHAR_T
15-
#if defined(_MSC_EXTENSIONS)
14+
15+
#ifdef _MSC_EXTENSIONS
1616
#define _WCHAR_T_DEFINED
1717
#endif
18-
#endif
18+
1919
typedef __WCHAR_TYPE__ wchar_t;
20+
2021
#endif
22+
2123
#endif

clang/lib/Headers/__stddef_wint_t.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
*===-----------------------------------------------------------------------===
88
*/
99

10-
/* Always define wint_t when modules are available. */
11-
#if !defined(_WINT_T) || __has_feature(modules)
12-
#if !__has_feature(modules)
10+
#ifndef _WINT_T
1311
#define _WINT_T
14-
#endif
12+
1513
typedef __WINT_TYPE__ wint_t;
14+
1615
#endif

clang/lib/Headers/module.modulemap

Lines changed: 157 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,164 @@ module _Builtin_intrinsics [system] [extern_c] {
153153
}
154154
}
155155

156-
module _Builtin_stddef_max_align_t [system] [extern_c] {
157-
header "__stddef_max_align_t.h"
156+
// Start -fbuiltin-headers-in-system-modules affected modules
157+
158+
// The following modules all ignore their top level headers
159+
// when -fbuiltin-headers-in-system-modules is passed, and
160+
// most of those headers join system modules when present.
161+
162+
// e.g. if -fbuiltin-headers-in-system-modules is passed, then
163+
// float.h will not be in the _Builtin_float module (that module
164+
// will be empty). If there is a system module that declares
165+
// `header "float.h"`, then the builtin float.h will join
166+
// that module. The system float.h (if present) will be treated
167+
// as a textual header in the sytem module.
168+
module _Builtin_float [system] {
169+
header "float.h"
170+
export *
171+
}
172+
173+
module _Builtin_inttypes [system] {
174+
header "inttypes.h"
175+
export *
176+
}
177+
178+
module _Builtin_iso646 [system] {
179+
header "iso646.h"
180+
export *
181+
}
182+
183+
module _Builtin_limits [system] {
184+
header "limits.h"
185+
export *
186+
}
187+
188+
module _Builtin_stdalign [system] {
189+
header "stdalign.h"
190+
export *
191+
}
192+
193+
// When -fbuiltin-headers-in-system-modules is passed, only
194+
// the top level headers are removed, the implementation headers
195+
// will always be in their submodules. That means when stdarg.h
196+
// is included, it will still import this module and make the
197+
// appropriate submodules visible.
198+
module _Builtin_stdarg [system] {
199+
textual header "stdarg.h"
200+
201+
explicit module __gnuc_va_list {
202+
header "__stdarg___gnuc_va_list.h"
203+
export *
204+
}
205+
206+
explicit module __va_copy {
207+
header "__stdarg___va_copy.h"
208+
export *
209+
}
210+
211+
explicit module va_arg {
212+
header "__stdarg_va_arg.h"
213+
export *
214+
}
215+
216+
explicit module va_copy {
217+
header "__stdarg_va_copy.h"
218+
export *
219+
}
220+
221+
explicit module va_list {
222+
header "__stdarg_va_list.h"
223+
export *
224+
}
225+
}
226+
227+
module _Builtin_stdatomic [system] {
228+
header "stdatomic.h"
229+
export *
230+
}
231+
232+
module _Builtin_stdbool [system] {
233+
header "stdbool.h"
234+
export *
235+
}
236+
237+
module _Builtin_stddef [system] {
238+
textual header "stddef.h"
239+
240+
explicit module max_align_t {
241+
header "__stddef_max_align_t.h"
242+
export *
243+
}
244+
245+
explicit module null {
246+
header "__stddef_null.h"
247+
export *
248+
}
249+
250+
explicit module nullptr_t {
251+
header "__stddef_nullptr_t.h"
252+
export *
253+
}
254+
255+
explicit module offsetof {
256+
header "__stddef_offsetof.h"
257+
export *
258+
}
259+
260+
explicit module ptrdiff_t {
261+
header "__stddef_ptrdiff_t.h"
262+
export *
263+
}
264+
265+
explicit module rsize_t {
266+
header "__stddef_rsize_t.h"
267+
export *
268+
}
269+
270+
explicit module size_t {
271+
header "__stddef_size_t.h"
272+
export *
273+
}
274+
275+
explicit module unreachable {
276+
header "__stddef_unreachable.h"
277+
export *
278+
}
279+
280+
explicit module wchar_t {
281+
header "__stddef_wchar_t.h"
282+
export *
283+
}
284+
}
285+
286+
/* wint_t is provided by <wchar.h> and not <stddef.h>. It's here
287+
* for compatibility, but must be explicitly requested. Therefore
288+
* __stddef_wint_t.h is not part of _Builtin_stddef. */
289+
module _Builtin_stddef_wint_t [system] {
290+
header "__stddef_wint_t.h"
291+
export *
292+
}
293+
294+
module _Builtin_stdint [system] {
295+
header "stdint.h"
296+
export *
297+
}
298+
299+
module _Builtin_stdnoreturn [system] {
300+
header "stdnoreturn.h"
301+
export *
302+
}
303+
304+
module _Builtin_tgmath [system] {
305+
header "tgmath.h"
306+
export *
307+
}
308+
309+
module _Builtin_unwind [system] {
310+
header "unwind.h"
311+
export *
158312
}
313+
// End -fbuiltin-headers-in-system-modules affected modules
159314

160315
module opencl_c {
161316
requires opencl

0 commit comments

Comments
 (0)