Skip to content

Commit 1f6dc6e

Browse files
committed
[AutoBump] Merge with 53c06c5 (Jun 13)
2 parents 3927881 + 53c06c5 commit 1f6dc6e

File tree

564 files changed

+20396
-18196
lines changed

Some content is hidden

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

564 files changed

+20396
-18196
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,16 @@ jobs:
209209
- uses: actions/checkout@v4
210210
- name: Install dependencies
211211
run: |
212-
choco install -y ninja wget
212+
choco install -y ninja
213213
pip install psutil
214214
- name: Install a current LLVM
215215
if: ${{ matrix.mingw != true }}
216216
run: |
217-
choco install -y llvm --version=17.0.6
217+
choco install -y llvm --version=18.1.6 --allow-downgrade
218218
- name: Install llvm-mingw
219219
if: ${{ matrix.mingw == true }}
220220
run: |
221-
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
221+
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240606/llvm-mingw-20240606-ucrt-x86_64.zip
222222
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
223223
del llvm-mingw*.zip
224224
mv llvm-mingw* c:\llvm-mingw

clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "MacroUsageCheck.h"
10+
#include "clang/Basic/TokenKinds.h"
1011
#include "clang/Frontend/CompilerInstance.h"
1112
#include "clang/Lex/PPCallbacks.h"
1213
#include "clang/Lex/Preprocessor.h"
1314
#include "llvm/ADT/STLExtras.h"
1415
#include "llvm/Support/Regex.h"
15-
#include <algorithm>
1616
#include <cctype>
1717
#include <functional>
1818

@@ -37,7 +37,10 @@ class MacroUsageCallbacks : public PPCallbacks {
3737
const MacroDirective *MD) override {
3838
if (SM.isWrittenInBuiltinFile(MD->getLocation()) ||
3939
MD->getMacroInfo()->isUsedForHeaderGuard() ||
40-
MD->getMacroInfo()->getNumTokens() == 0)
40+
MD->getMacroInfo()->tokens_empty() ||
41+
llvm::any_of(MD->getMacroInfo()->tokens(), [](const Token &T) {
42+
return T.isOneOf(tok::TokenKind::hash, tok::TokenKind::hashhash);
43+
}))
4144
return;
4245

4346
if (IgnoreCommandLineMacros &&

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ Changes in existing checks
266266
<clang-tidy/checks/bugprone/use-after-move>` check to also handle
267267
calls to ``std::forward``.
268268

269+
- Improved :doc:`cppcoreguidelines-macro-usage
270+
<clang-tidy/checks/cppcoreguidelines/macro-usage>` check by ignoring macro with
271+
hash preprocessing token.
272+
269273
- Improved :doc:`cppcoreguidelines-missing-std-forward
270274
<clang-tidy/checks/cppcoreguidelines/missing-std-forward>` check by no longer
271275
giving false positives for deleted functions, by fixing false negatives when only

clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/macro-usage.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Examples:
1717
#define C 0
1818
#define F1(x, y) ((a) > (b) ? (a) : (b))
1919
#define F2(...) (__VA_ARGS__)
20+
#define F3(x, y) x##y
2021
#define COMMA ,
2122
#define NORETURN [[noreturn]]
2223
#define DEPRECATED attribute((deprecated))

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/macro-usage.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
// CHECK-MESSAGES: [[@LINE-1]]:9: warning: variadic macro 'PROBLEMATIC_VARIADIC2' used; consider using a 'constexpr' variadic template function
3232

3333
// These are all examples of common macros that shouldn't have constexpr suggestions.
34+
#define CONCAT_NAME(a, b) a##b
35+
36+
#define CONCAT_STR(a, b) #a #b
37+
3438
#define COMMA ,
3539

3640
#define NORETURN [[noreturn]]

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,24 @@ foreach(target armv6m-unknown-eabi)
328328
endforeach()
329329
set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
330330
set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
331+
set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
332+
set(RUNTIMES_${target}_LIBCXX_CXX_ABI none CACHE STRING "")
333+
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
334+
set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC OFF CACHE BOOL "")
335+
set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
336+
set(RUNTIMES_${target}_LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
337+
set(RUNTIMES_${target}_LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
338+
set(RUNTIMES_${target}_LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "")
339+
set(RUNTIMES_${target}_LIBCXX_ENABLE_WIDE_CHARACTERS OFF CACHE BOOL "")
340+
set(RUNTIMES_${target}_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
341+
set(RUNTIMES_${target}_LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
342+
set(RUNTIMES_${target}_LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
343+
set(RUNTIMES_${target}_LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")
344+
set(RUNTIMES_${target}_LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
345+
set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
331346
set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
332347
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
333-
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
348+
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc;libcxx" CACHE STRING "")
334349
endforeach()
335350

336351
foreach(target riscv32-unknown-elf)
@@ -361,9 +376,24 @@ foreach(target riscv32-unknown-elf)
361376
endforeach()
362377
set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
363378
set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
379+
set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
380+
set(RUNTIMES_${target}_LIBCXX_CXX_ABI none CACHE STRING "")
381+
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
382+
set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC OFF CACHE BOOL "")
383+
set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
384+
set(RUNTIMES_${target}_LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
385+
set(RUNTIMES_${target}_LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
386+
set(RUNTIMES_${target}_LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "")
387+
set(RUNTIMES_${target}_LIBCXX_ENABLE_WIDE_CHARACTERS OFF CACHE BOOL "")
388+
set(RUNTIMES_${target}_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
389+
set(RUNTIMES_${target}_LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
390+
set(RUNTIMES_${target}_LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
391+
set(RUNTIMES_${target}_LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")
392+
set(RUNTIMES_${target}_LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
393+
set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
364394
set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
365395
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
366-
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
396+
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc;libcxx" CACHE STRING "")
367397
endforeach()
368398

369399
set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")

clang/docs/APINotes.rst

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ entries:
8080

8181
Name: MyFramework
8282

83-
:Classes, Protocols, Tags, Typedefs, Globals, Enumerators, Functions:
83+
:Classes, Protocols, Tags, Typedefs, Globals, Enumerators, Functions, Namespaces:
8484

8585
Arrays of top-level declarations. Each entry in the array must have a
86-
'Name' key with its Objective-C name. "Tags" refers to structs, enums, and
87-
unions; "Enumerators" refers to enum cases.
86+
'Name' key with its Objective-C or C++ name. "Tags" refers to structs,
87+
C++ classes, enums, and unions; "Classes" refers to Objective-C classes;
88+
"Enumerators" refers to enum cases.
8889

8990
::
9091

@@ -157,6 +158,36 @@ declaration kind), all of which are optional:
157158
- Class: NSBundle
158159
SwiftName: Bundle
159160

161+
:SwiftImportAs:
162+
163+
For a class, possible values are ``owned`` (equivalent to
164+
``SWIFT_SELF_CONTAINED``) or ``reference`` (equivalent to
165+
``SWIFT_SHARED_REFERENCE``, also requires specifying ``SwiftReleaseOp`` and
166+
``SwiftRetainOp``).
167+
168+
For a method, possible values are ``unsafe`` (equivalent
169+
to ``SWIFT_RETURNS_INDEPENDENT_VALUE``) or ``computed_property`` (equivalent to
170+
``SWIFT_COMPUTED_PROPERTY``).
171+
172+
::
173+
174+
Tags:
175+
- Name: RefCountedStorage
176+
SwiftImportAs: reference
177+
SwiftReleaseOp: RCRelease
178+
SwiftRetainOp: RCRetain
179+
180+
:SwiftCopyable:
181+
182+
Allows annotating a C++ class as non-copyable in Swift. Equivalent to
183+
``SWIFT_NONCOPYABLE``, or to an explicit conformance ``: ~Copyable``.
184+
185+
::
186+
187+
Tags:
188+
- Name: tzdb
189+
SwiftCopyable: false
190+
160191
:Availability, AvailabilityMsg:
161192

162193
A value of "nonswift" is equivalent to ``NS_SWIFT_UNAVAILABLE``. A value of

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,11 +903,13 @@ Arm and AArch64 Support
903903
a feature modifier for -march and -mcpu as well as via target attributes
904904
like ``target_version`` or ``target_clones``.
905905
- Support has been added for the following processors (-mcpu identifiers in parenthesis):
906+
* Arm Cortex-R52+ (cortex-r52plus).
907+
* Arm Cortex-R82AE (cortex-r82ae).
906908
* Arm Cortex-A78AE (cortex-a78ae).
907909
* Arm Cortex-A520AE (cortex-a520ae).
908910
* Arm Cortex-A720AE (cortex-a720ae).
909-
* Arm Cortex-R82AE (cortex-r82ae).
910-
* Arm Cortex-R52+ (cortex-r52plus).
911+
* Arm Cortex-A725 (cortex-a725).
912+
* Arm Cortex-X925 (cortex-x925).
911913
* Arm Neoverse-N3 (neoverse-n3).
912914
* Arm Neoverse-V3 (neoverse-v3).
913915
* Arm Neoverse-V3AE (neoverse-v3ae).

clang/docs/analyzer/checkers.rst

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,21 +2452,6 @@ Check for pointer subtractions on two pointers pointing to different memory chun
24522452
int d = &y - &x; // warn
24532453
}
24542454
2455-
.. _alpha-core-SizeofPtr:
2456-
2457-
alpha.core.SizeofPtr (C)
2458-
""""""""""""""""""""""""
2459-
Warn about unintended use of ``sizeof()`` on pointer expressions.
2460-
2461-
.. code-block:: c
2462-
2463-
struct s {};
2464-
2465-
int test(struct s *p) {
2466-
return sizeof(p);
2467-
// warn: sizeof(ptr) can produce an unexpected result
2468-
}
2469-
24702455
.. _alpha-core-StackAddressAsyncEscape:
24712456
24722457
alpha.core.StackAddressAsyncEscape (C)

clang/include/clang/AST/ASTContext.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,13 @@ class ASTContext : public RefCountedBase<ASTContext> {
17711771
QualType DeducedType,
17721772
bool IsDependent) const;
17731773

1774+
private:
1775+
QualType getDeducedTemplateSpecializationTypeInternal(TemplateName Template,
1776+
QualType DeducedType,
1777+
bool IsDependent,
1778+
QualType Canon) const;
1779+
1780+
public:
17741781
/// Return the unique reference to the type for the specified TagDecl
17751782
/// (struct/union/class/enum) decl.
17761783
QualType getTagDeclType(const TagDecl *Decl) const;
@@ -3203,9 +3210,6 @@ class ASTContext : public RefCountedBase<ASTContext> {
32033210
/// valid feature names.
32043211
ParsedTargetAttr filterFunctionTargetAttrs(const TargetAttr *TD) const;
32053212

3206-
std::vector<std::string>
3207-
filterFunctionTargetVersionAttrs(const TargetVersionAttr *TV) const;
3208-
32093213
void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
32103214
const FunctionDecl *) const;
32113215
void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,

0 commit comments

Comments
 (0)