Skip to content

Commit 5b82b50

Browse files
rebase
Created using spr 1.3.4
2 parents 77d4652 + 3f91174 commit 5b82b50

File tree

937 files changed

+79475
-102200
lines changed

Some content is hidden

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

937 files changed

+79475
-102200
lines changed

.ci/monolithic-windows.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7474
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
7575
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
7676
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
77-
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
78-
-D LLVM_PARALLEL_COMPILE_JOBS=${MAX_PARALLEL_COMPILE_JOBS} \
79-
-D LLVM_PARALLEL_LINK_JOBS=${MAX_PARALLEL_LINK_JOBS}
77+
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
8078

8179
echo "::endgroup::"
8280
echo "::group::ninja"

.github/workflows/premerge.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ jobs:
110110
if: ${{ steps.vars.outputs.windows-projects != '' }}
111111
shell: cmd
112112
run: |
113-
set MAX_PARALLEL_COMPILE_JOBS=64
114-
set MAX_PARALLEL_LINK_JOBS=64
115113
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
116114
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
117115
- name: Upload Artifacts

clang-tools-extra/clangd/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import lit.llvm
22

33
lit.llvm.initialize(lit_config, config)
4-
lit.llvm.llvm_config.use_clang([], [], required=False)
4+
lit.llvm.llvm_config.clang_setup()
55
lit.llvm.llvm_config.use_default_substitutions()
66

77
config.name = "Clangd"

clang-tools-extra/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
config.test_exec_root = os.path.join(config.clang_tools_binary_dir, "test")
4343

4444
# Tools need the same environment setup as clang (we don't need clang itself).
45-
llvm_config.use_clang(required=False)
45+
llvm_config.clang_setup()
4646

4747
if config.clang_tidy_staticanalyzer:
4848
config.available_features.add("static-analyzer")

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv7em-none-eabi;armv8m.main-n
362362
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
363363
set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
364364
set(RUNTIMES_${target}_LIBCXX_SHARED_OUTPUT_NAME "c++-shared" CACHE STRING "")
365-
set(RUNTIMES_${target}_LIBCXX_LIBC "llvm-libc" CACHE STRING "")
366365
set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
367366
set(RUNTIMES_${target}_LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
368367
set(RUNTIMES_${target}_LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
@@ -376,6 +375,7 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv7em-none-eabi;armv8m.main-n
376375
set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
377376
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
378377
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc;libcxx" CACHE STRING "")
378+
set(RUNTIMES_${target}_RUNTIMES_USE_LIBC "llvm-libc" CACHE STRING "")
379379

380380
# Enable FatLTO for baremetal runtimes
381381
set(RUNTIMES_${target}_LLVM_ENABLE_LTO OFF CACHE BOOL "")
@@ -417,7 +417,6 @@ foreach(target riscv32-unknown-elf)
417417
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
418418
set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
419419
set(RUNTIMES_${target}_LIBCXX_SHARED_OUTPUT_NAME "c++-shared" CACHE STRING "")
420-
set(RUNTIMES_${target}_LIBCXX_LIBC "llvm-libc" CACHE STRING "")
421420
set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
422421
set(RUNTIMES_${target}_LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
423422
set(RUNTIMES_${target}_LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
@@ -431,6 +430,7 @@ foreach(target riscv32-unknown-elf)
431430
set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
432431
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
433432
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc;libcxx" CACHE STRING "")
433+
set(RUNTIMES_${target}_RUNTIMES_USE_LIBC "llvm-libc" CACHE STRING "")
434434

435435
# Enable FatLTO for baremetal runtimes
436436
set(RUNTIMES_${target}_LLVM_ENABLE_LTO OFF CACHE BOOL "")

clang/docs/ReleaseNotes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ C++20 Feature Support
145145
- Fixed a crash with a defaulted spaceship (``<=>``) operator when the class
146146
contains a member declaration of vector type. Vector types cannot yet be
147147
compared directly, so this causes the operator to be deleted. (#GH137452)
148+
- Implement constant evaluation of lambdas that capture structured bindings.
149+
(#GH145956)
148150

149151
C++17 Feature Support
150152
^^^^^^^^^^^^^^^^^^^^^
@@ -660,6 +662,10 @@ Improvements to Clang's diagnostics
660662
#GH142457, #GH139913, #GH138850, #GH137867, #GH137860, #GH107840, #GH93308,
661663
#GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490,
662664
#GH36703, #GH32903, #GH23312, #GH69874.
665+
666+
- Clang no longer emits a spurious -Wdangling-gsl warning in C++23 when
667+
iterating over an element of a temporary container in a range-based
668+
for loop.(#GH109793, #GH145164)
663669

664670
- Fixed false positives in ``-Wformat-truncation`` and ``-Wformat-overflow``
665671
diagnostics when floating-point numbers had both width field and plus or space
@@ -922,12 +928,17 @@ Bug Fixes to C++ Support
922928
- Fixed a crash when constant evaluating some explicit object member assignment operators. (#GH142835)
923929
- Fixed an access checking bug when substituting into concepts (#GH115838)
924930
- Fix a bug where private access specifier of overloaded function not respected. (#GH107629)
931+
- Correctly handles calling an explicit object member function template overload set
932+
through its address (``(&Foo::bar<baz>)()``).
925933
- Correctly handle allocations in the condition of a ``if constexpr``.(#GH120197) (#GH134820)
926934
- Fixed a crash when handling invalid member using-declaration in C++20+ mode. (#GH63254)
935+
- Fixed parsing of lambda expressions that appear after ``*`` or ``&`` in contexts where a declaration can appear. (#GH63880)
936+
- Fix name lookup in lambda appearing in the body of a requires expression. (#GH147650)
927937
- Fix a crash when trying to instantiate an ambiguous specialization. (#GH51866)
928938
- Improved handling of variables with ``consteval`` constructors, to
929939
consistently treat the initializer as manifestly constant-evaluated.
930940
(#GH135281)
941+
- Fix a crash in the presence of invalid base classes. (#GH147186)
931942

932943
Bug Fixes to AST Handling
933944
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1228,6 +1239,7 @@ OpenMP Support
12281239
- Fixed mapping of arrays of structs containing nested structs with user defined
12291240
mappers, by using compiler-generated default mappers for the outer structs for
12301241
such maps.
1242+
- Deprecation warning has been emitted for deprecated delimited form of ``declare target``.
12311243

12321244
Improvements
12331245
^^^^^^^^^^^^

clang/include/clang/AST/Decl.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,11 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
10901090

10911091
LLVM_PREFERRED_TYPE(bool)
10921092
unsigned IsCXXCondDecl : 1;
1093+
1094+
/// Whether this variable is the implicit __range variable in a for-range
1095+
/// loop.
1096+
LLVM_PREFERRED_TYPE(bool)
1097+
unsigned IsCXXForRangeImplicitVar : 1;
10931098
};
10941099

10951100
union {
@@ -1591,6 +1596,19 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
15911596
NonParmVarDeclBits.IsCXXCondDecl = true;
15921597
}
15931598

1599+
/// Whether this variable is the implicit '__range' variable in C++
1600+
/// range-based for loops.
1601+
bool isCXXForRangeImplicitVar() const {
1602+
return isa<ParmVarDecl>(this) ? false
1603+
: NonParmVarDeclBits.IsCXXForRangeImplicitVar;
1604+
}
1605+
1606+
void setCXXForRangeImplicitVar(bool FRV) {
1607+
assert(!isa<ParmVarDecl>(this) &&
1608+
"Cannot set IsCXXForRangeImplicitVar on ParmVarDecl");
1609+
NonParmVarDeclBits.IsCXXForRangeImplicitVar = FRV;
1610+
}
1611+
15941612
/// Determines if this variable's alignment is dependent.
15951613
bool hasDependentAlignment() const;
15961614

clang/include/clang/AST/ExprConcepts.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ class ExprRequirement : public Requirement {
310310
// TODO: Can we maybe not save the whole template parameter list and just
311311
// the type constraint? Saving the whole TPL makes it easier to handle in
312312
// serialization but is less elegant.
313+
ReturnTypeRequirement(TemplateParameterList *TPL, bool IsDependent);
313314
ReturnTypeRequirement(TemplateParameterList *TPL);
314315

315316
bool isDependent() const {

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#include "clang/AST/DeclTemplate.h"
5656
#include "clang/AST/Expr.h"
5757
#include "clang/AST/ExprCXX.h"
58+
#include "clang/AST/ExprConcepts.h"
5859
#include "clang/AST/ExprObjC.h"
5960
#include "clang/AST/LambdaCapture.h"
6061
#include "clang/AST/NestedNameSpecifier.h"
@@ -1363,6 +1364,26 @@ extern const internal::VariadicDynCastAllOfMatcher<Decl, CXXDeductionGuideDecl>
13631364
extern const internal::VariadicDynCastAllOfMatcher<Decl, ConceptDecl>
13641365
conceptDecl;
13651366

1367+
/// Matches concept requirement.
1368+
///
1369+
/// Example matches 'requires(T p) { *p; }'
1370+
/// \code
1371+
/// template<typename T>
1372+
/// concept dereferencable = requires(T p) { *p; }
1373+
/// \endcode
1374+
extern const internal::VariadicDynCastAllOfMatcher<Expr, RequiresExpr>
1375+
requiresExpr;
1376+
1377+
/// Matches concept requirement body declaration.
1378+
///
1379+
/// Example matches '{ *p; }'
1380+
/// \code
1381+
/// template<typename T>
1382+
/// concept dereferencable = requires(T p) { *p; }
1383+
/// \endcode
1384+
extern const internal::VariadicDynCastAllOfMatcher<Decl, RequiresExprBodyDecl>
1385+
requiresExprBodyDecl;
1386+
13661387
/// Matches variable declarations.
13671388
///
13681389
/// Note: this does not match declarations of member variables, which are

0 commit comments

Comments
 (0)