Skip to content

Commit 3664076

Browse files
committed
Rebase
Created using spr 1.3.6-beta.1
2 parents d72e50a + e7fb49c commit 3664076

File tree

218 files changed

+11733
-8214
lines changed

Some content is hidden

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

218 files changed

+11733
-8214
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ C++20 Feature Support
104104

105105
- Clang now implements [module.import]p7 fully. Clang now will import module
106106
units transitively for the module units coming from the same module of the
107-
current module units.
108-
Fixes `#84002 <https://github.com/llvm/llvm-project/issues/84002>`_.
107+
current module units. Fixes #GH84002
109108

110109
- Initial support for class template argument deduction (CTAD) for type alias
111110
templates (`P1814R0 <https://wg21.link/p1814r0>`_).
@@ -135,8 +134,7 @@ C++2c Feature Support
135134
Resolutions to C++ Defect Reports
136135
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137136
- Substitute template parameter pack, when it is not explicitly specified
138-
in the template parameters, but is deduced from a previous argument.
139-
(`#78449: <https://github.com/llvm/llvm-project/issues/78449>`_).
137+
in the template parameters, but is deduced from a previous argument. (#GH78449)
140138

141139
- Type qualifications are now ignored when evaluating layout compatibility
142140
of two types.
@@ -176,8 +174,7 @@ C23 Feature Support
176174

177175
- Clang now generates predefined macros of the form ``__TYPE_FMTB__`` and
178176
``__TYPE_FMTb__`` (e.g., ``__UINT_FAST64_FMTB__``) in C23 mode for use with
179-
macros typically exposed from ``<inttypes.h>``, such as ``PRIb8``.
180-
(`#81896: <https://github.com/llvm/llvm-project/issues/81896>`_).
177+
macros typically exposed from ``<inttypes.h>``, such as ``PRIb8``. (#GH81896)
181178

182179
- Clang now supports `N3018 The constexpr specifier for object definitions`
183180
<https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm>`_.
@@ -215,7 +212,7 @@ New Compiler Flags
215212

216213
- ``-Wmissing-designated-field-initializers``, grouped under ``-Wmissing-field-initializers``.
217214
This diagnostic can be disabled to make ``-Wmissing-field-initializers`` behave
218-
like it did before Clang 18.x. Fixes (`#56628 <https://github.com/llvm/llvm-project/issues/68933>`_)
215+
like it did before Clang 18.x. Fixes #GH56628
219216

220217
Deprecated Compiler Flags
221218
-------------------------
@@ -254,8 +251,7 @@ Removed Compiler Flags
254251

255252
- The ``-freroll-loops`` flag has been removed. It had no effect since Clang 13.
256253
- ``-m[no-]unaligned-access`` is removed for RISC-V and LoongArch.
257-
``-m[no-]strict-align``, also supported by GCC, should be used instead.
258-
(`#85350 <https://github.com/llvm/llvm-project/pull/85350>`_.)
254+
``-m[no-]strict-align``, also supported by GCC, should be used instead. (#GH85350)
259255

260256
Attribute Changes in Clang
261257
--------------------------
@@ -325,8 +321,7 @@ Improvements to Clang's diagnostics
325321
Fixes #GH82512.
326322

327323
- Clang now provides improved warnings for the ``cleanup`` attribute to detect misuse scenarios,
328-
such as attempting to call ``free`` on an unallocated object. Fixes
329-
`#79443 <https://github.com/llvm/llvm-project/issues/79443>`_.
324+
such as attempting to call ``free`` on an unallocated object. Fixes #GH79443.
330325

331326
- Clang no longer warns when the ``bitand`` operator is used with boolean
332327
operands, distinguishing it from potential typographical errors or unintended
@@ -372,11 +367,10 @@ Improvements to Clang's time-trace
372367
Bug Fixes in This Version
373368
-------------------------
374369
- Clang's ``-Wundefined-func-template`` no longer warns on pure virtual
375-
functions.
376-
(`#74016 <https://github.com/llvm/llvm-project/issues/74016>`_)
370+
functions. (#GH74016)
377371

378372
- Fixed missing warnings when comparing mismatched enumeration constants
379-
in C (`#29217 <https://github.com/llvm/llvm-project/issues/29217>`).
373+
in C (#GH29217)
380374

381375
- Clang now accepts elaborated-type-specifiers that explicitly specialize
382376
a member class template for an implicit instantiation of a class template.
@@ -415,7 +409,7 @@ Bug Fixes in This Version
415409
type only rather than to the complex type (e.g. ``_Complex float / int`` is now evaluated
416410
as ``_Complex float / float`` rather than ``_Complex float / _Complex float``), as mandated
417411
by the C standard. This significantly improves codegen of `*` and `/` especially.
418-
Fixes (`#31205 <https://github.com/llvm/llvm-project/issues/31205>`_).
412+
Fixes #GH31205.
419413

420414
- Fixes an assertion failure on invalid code when trying to define member
421415
functions in lambdas.
@@ -464,8 +458,7 @@ Bug Fixes to C++ Support
464458
- Fix a crash when trying to call a varargs function that also has an explicit object parameter. (#GH80971)
465459
- Fixed a bug where abbreviated function templates would append their invented template parameters to
466460
an empty template parameter lists.
467-
- Fix parsing of abominable function types inside type traits.
468-
Fixes (`#77585 <https://github.com/llvm/llvm-project/issues/77585>`_)
461+
- Fix parsing of abominable function types inside type traits. Fixes #GH77585
469462
- Clang now classifies aggregate initialization in C++17 and newer as constant
470463
or non-constant more accurately. Previously, only a subset of the initializer
471464
elements were considered, misclassifying some initializers as constant. Partially fixes
@@ -506,9 +499,7 @@ Bug Fixes to C++ Support
506499
- Fix a bug where overload resolution falsely reported an ambiguity when it was comparing
507500
a member-function against a non member function or a member-function with an
508501
explicit object parameter against a member function with no explicit object parameter
509-
when one of the function had more specialized templates.
510-
Fixes (`#82509 <https://github.com/llvm/llvm-project/issues/82509>`_)
511-
and (`#74494 <https://github.com/llvm/llvm-project/issues/74494>`_)
502+
when one of the function had more specialized templates. Fixes #GH82509 and #GH74494
512503
- Clang now supports direct lambda calls inside of a type alias template declarations.
513504
This addresses (#GH70601), (#GH76674), (#GH79555), (#GH81145) and (#GH82104).
514505
- Allow access to a public template alias declaration that refers to friend's
@@ -530,15 +521,15 @@ Bug Fixes to C++ Support
530521
- Fixed a bug that prevented member function templates of class templates declared with a deduced return type
531522
from being explicitly specialized for a given implicit instantiation of the class template.
532523

533-
- Fix crash when inheriting from a cv-qualified type. Fixes:
534-
(`#35603 <https://github.com/llvm/llvm-project/issues/35603>`_)
524+
- Fix crash when inheriting from a cv-qualified type. Fixes #GH35603
535525
- Fix a crash when the using enum declaration uses an anonymous enumeration. Fixes (#GH86790).
536526
- Handled an edge case in ``getFullyPackExpandedSize`` so that we now avoid a false-positive diagnostic. (#GH84220)
537527
- Clang now correctly tracks type dependence of by-value captures in lambdas with an explicit
538528
object parameter.
539529
Fixes (#GH70604), (#GH79754), (#GH84163), (#GH84425), (#GH86054), (#GH86398), and (#GH86399).
540530
- Fix a crash when deducing ``auto`` from an invalid dereference (#GH88329).
541531
- Fix a crash in requires expression with templated base class member function. Fixes (#GH84020).
532+
- Placement new initializes typedef array with correct size (#GH41441)
542533

543534
Bug Fixes to AST Handling
544535
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -552,8 +543,7 @@ Miscellaneous Clang Crashes Fixed
552543
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
553544

554545
- Do not attempt to dump the layout of dependent types or invalid declarations
555-
when ``-fdump-record-layouts-complete`` is passed.
556-
Fixes (`#83684 <https://github.com/llvm/llvm-project/issues/83684>`_).
546+
when ``-fdump-record-layouts-complete`` is passed. Fixes #GH83684.
557547

558548
OpenACC Specific Changes
559549
------------------------
@@ -603,8 +593,7 @@ Windows Support
603593
would only be included if AVX was enabled at compile time. This was done to work
604594
around include times from MSVC STL including ``intrin.h`` under clang-cl.
605595
Clang-cl now provides ``intrin0.h`` for MSVC STL and therefore all intrinsic
606-
features without requiring enablement at compile time.
607-
Fixes: (`#53520 <https://github.com/llvm/llvm-project/issues/53520>`_)
596+
features without requiring enablement at compile time. Fixes #GH53520
608597

609598
- Improved compile times with MSVC STL. MSVC provides ``intrin0.h`` which is a
610599
header that only includes intrinsics that are used by MSVC STL to avoid the

clang/include/clang/AST/DeclBase.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -672,16 +672,6 @@ class alignas(8) Decl {
672672
/// Whether this declaration comes from explicit global module.
673673
bool isFromExplicitGlobalModule() const;
674674

675-
/// Check if we should skip checking ODRHash for declaration \param D.
676-
///
677-
/// The existing ODRHash mechanism seems to be not stable enough and
678-
/// the false positive ODR violation reports are annoying and we rarely see
679-
/// true ODR violation reports. Also we learned that MSVC disabled ODR checks
680-
/// for declarations in GMF. So we try to disable ODR checks in the GMF to
681-
/// get better user experiences before we make the ODR violation checks stable
682-
/// enough.
683-
bool shouldSkipCheckingODR() const;
684-
685675
/// Return true if this declaration has an attribute which acts as
686676
/// definition of the entity, such as 'alias' or 'ifunc'.
687677
bool hasDefiningAttr() const;

clang/include/clang/Basic/Cuda.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,15 @@ const char *CudaVersionToString(CudaVersion V);
5050
// Input is "Major.Minor"
5151
CudaVersion CudaStringToVersion(const llvm::Twine &S);
5252

53-
// We have a name conflict with sys/mac.h on AIX
54-
#ifdef SM_32
55-
#undef SM_32
56-
#endif
5753
enum class CudaArch {
5854
UNUSED,
5955
UNKNOWN,
56+
// TODO: Deprecate and remove GPU architectures older than sm_52.
6057
SM_20,
6158
SM_21,
6259
SM_30,
63-
SM_32,
60+
// This has a name conflict with sys/mac.h on AIX, rename it as a workaround.
61+
SM_32_,
6462
SM_35,
6563
SM_37,
6664
SM_50,

clang/include/clang/Parse/Parser.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "clang/Lex/CodeCompletionHandler.h"
1919
#include "clang/Lex/Preprocessor.h"
2020
#include "clang/Sema/Sema.h"
21+
#include "clang/Sema/SemaOpenMP.h"
2122
#include "llvm/ADT/SmallVector.h"
2223
#include "llvm/Frontend/OpenMP/OMPContext.h"
2324
#include "llvm/Support/SaveAndRestore.h"
@@ -2537,7 +2538,7 @@ class Parser : public CodeCompletionHandler {
25372538
/// Returns true for declaration, false for expression.
25382539
bool isForInitDeclaration() {
25392540
if (getLangOpts().OpenMP)
2540-
Actions.startOpenMPLoop();
2541+
Actions.OpenMP().startOpenMPLoop();
25412542
if (getLangOpts().CPlusPlus)
25422543
return Tok.is(tok::kw_using) ||
25432544
isCXXSimpleDeclaration(/*AllowForRangeDecl=*/true);
@@ -3396,7 +3397,7 @@ class Parser : public CodeCompletionHandler {
33963397
SourceLocation Loc);
33973398

33983399
/// Parse clauses for '#pragma omp [begin] declare target'.
3399-
void ParseOMPDeclareTargetClauses(Sema::DeclareTargetContextInfo &DTCI);
3400+
void ParseOMPDeclareTargetClauses(SemaOpenMP::DeclareTargetContextInfo &DTCI);
34003401

34013402
/// Parse '#pragma omp end declare target'.
34023403
void ParseOMPEndDeclareTargetDirective(OpenMPDirectiveKind BeginDKind,
@@ -3486,7 +3487,7 @@ class Parser : public CodeCompletionHandler {
34863487
/// Parses indirect clause
34873488
/// \param ParseOnly true to skip the clause's semantic actions and return
34883489
// false;
3489-
bool ParseOpenMPIndirectClause(Sema::DeclareTargetContextInfo &DTCI,
3490+
bool ParseOpenMPIndirectClause(SemaOpenMP::DeclareTargetContextInfo &DTCI,
34903491
bool ParseOnly);
34913492
/// Parses clause with a single expression and an additional argument
34923493
/// of a kind \a Kind.
@@ -3556,24 +3557,24 @@ class Parser : public CodeCompletionHandler {
35563557

35573558
/// Parses a reserved locator like 'omp_all_memory'.
35583559
bool ParseOpenMPReservedLocator(OpenMPClauseKind Kind,
3559-
Sema::OpenMPVarListDataTy &Data,
3560+
SemaOpenMP::OpenMPVarListDataTy &Data,
35603561
const LangOptions &LangOpts);
35613562
/// Parses clauses with list.
35623563
bool ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind,
35633564
SmallVectorImpl<Expr *> &Vars,
3564-
Sema::OpenMPVarListDataTy &Data);
3565+
SemaOpenMP::OpenMPVarListDataTy &Data);
35653566
bool ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType,
35663567
bool ObjectHadErrors, bool EnteringContext,
35673568
bool AllowDestructorName, bool AllowConstructorName,
35683569
bool AllowDeductionGuide,
35693570
SourceLocation *TemplateKWLoc, UnqualifiedId &Result);
35703571

35713572
/// Parses the mapper modifier in map, to, and from clauses.
3572-
bool parseMapperModifier(Sema::OpenMPVarListDataTy &Data);
3573+
bool parseMapperModifier(SemaOpenMP::OpenMPVarListDataTy &Data);
35733574
/// Parses map-type-modifiers in map clause.
35743575
/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list)
35753576
/// where, map-type-modifier ::= always | close | mapper(mapper-identifier)
3576-
bool parseMapTypeModifiers(Sema::OpenMPVarListDataTy &Data);
3577+
bool parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy &Data);
35773578

35783579
//===--------------------------------------------------------------------===//
35793580
// OpenACC Parsing.

0 commit comments

Comments
 (0)