Skip to content

Commit 10590e8

Browse files
authored
merge main into amd-staging (llvm#1716)
2 parents 3d08600 + 28ad8eb commit 10590e8

File tree

244 files changed

+5012
-6132
lines changed

Some content is hidden

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

244 files changed

+5012
-6132
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
include:
2020
- os: ubuntu-24.04
2121
ccache-variant: sccache
22-
c_compiler: clang
23-
cpp_compiler: clang++
22+
c_compiler: clang-20
23+
cpp_compiler: clang++-20
2424
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
2525
- os: ubuntu-24.04-arm
2626
ccache-variant: ccache
27-
c_compiler: clang
28-
cpp_compiler: clang++
27+
c_compiler: clang-20
28+
cpp_compiler: clang++-20
2929
# TODO: add back gcc build when it is fixed
3030
# - c_compiler: gcc
3131
# cpp_compiler: g++
@@ -51,6 +51,9 @@ jobs:
5151
# For more information, see https://wiki.debian.org/Multiarch/LibraryPathOverview
5252
- name: Prepare dependencies (Ubuntu)
5353
run: |
54+
wget https://apt.llvm.org/llvm.sh
55+
chmod +x llvm.sh
56+
sudo ./llvm.sh 20
5457
sudo apt-get update
5558
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
5659
sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ C++ Language Changes
9696
asm((std::string_view("nop")) ::: (std::string_view("memory")));
9797
}
9898

99-
- Clang now implements the changes to overload resolution proposed by section 1 and 2 of
100-
`P3606 <https://wg21.link/P3606R0>`_. If a non-template candidate exists in an overload set that is
101-
a perfect match (all conversion sequences are identity conversions) template candidates are not instantiated.
102-
Diagnostics that would have resulted from the instantiation of these template candidates are no longer
103-
produced. This aligns Clang closer to the behavior of GCC, and fixes (#GH62096), (#GH74581), and (#GH74581).
104-
10599
C++2c Feature Support
106100
^^^^^^^^^^^^^^^^^^^^^
107101

@@ -448,6 +442,9 @@ Bug Fixes in This Version
448442
using C++23 "deducing this" did not have a diagnostic location (#GH135522)
449443

450444
- Fixed a crash when a ``friend`` function is redefined as deleted. (#GH135506)
445+
- Fixed a crash when ``#embed`` appears as a part of a failed constant
446+
evaluation. The crashes were happening during diagnostics emission due to
447+
unimplemented statement printer. (#GH132641)
451448

452449
Bug Fixes to Compiler Builtins
453450
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -490,6 +487,7 @@ Bug Fixes to C++ Support
490487
by template argument deduction.
491488
- Clang is now better at instantiating the function definition after its use inside
492489
of a constexpr lambda. (#GH125747)
490+
- Fixed a local class member function instantiation bug inside dependent lambdas. (#GH59734), (#GH132208)
493491
- Clang no longer crashes when trying to unify the types of arrays with
494492
certain differences in qualifiers (this could happen during template argument
495493
deduction or when building a ternary operator). (#GH97005)

clang/include/clang/AST/Expr.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4961,6 +4961,9 @@ class SourceLocExpr final : public Expr {
49614961
/// Stores data related to a single #embed directive.
49624962
struct EmbedDataStorage {
49634963
StringLiteral *BinaryData;
4964+
// FileName string already includes braces, i.e. it is <files/my_file> for a
4965+
// directive #embed <files/my_file>.
4966+
StringRef FileName;
49644967
size_t getDataElementCount() const { return BinaryData->getByteLength(); }
49654968
};
49664969

@@ -5007,6 +5010,7 @@ class EmbedExpr final : public Expr {
50075010
SourceLocation getEndLoc() const { return EmbedKeywordLoc; }
50085011

50095012
StringLiteral *getDataStringLiteral() const { return Data->BinaryData; }
5013+
StringRef getFileName() const { return Data->FileName; }
50105014
EmbedDataStorage *getData() const { return Data; }
50115015

50125016
unsigned getStartingElementPos() const { return Begin; }

clang/include/clang/AST/SYCLKernelInfo.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,23 @@ namespace clang {
2222
class SYCLKernelInfo {
2323
public:
2424
SYCLKernelInfo(CanQualType KernelNameType,
25-
const FunctionDecl *KernelEntryPointDecl)
25+
const FunctionDecl *KernelEntryPointDecl,
26+
const std::string &KernelName)
2627
: KernelNameType(KernelNameType),
27-
KernelEntryPointDecl(KernelEntryPointDecl) {}
28+
KernelEntryPointDecl(KernelEntryPointDecl), KernelName(KernelName) {}
2829

2930
CanQualType getKernelNameType() const { return KernelNameType; }
3031

3132
const FunctionDecl *getKernelEntryPointDecl() const {
3233
return KernelEntryPointDecl;
3334
}
3435

36+
const std::string &GetKernelName() const { return KernelName; }
37+
3538
private:
3639
CanQualType KernelNameType;
3740
const FunctionDecl *KernelEntryPointDecl;
41+
std::string KernelName;
3842
};
3943

4044
} // namespace clang

clang/include/clang/Lex/Preprocessor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ class Preprocessor {
27622762
const FileEntry *LookupFromFile = nullptr);
27632763
void HandleEmbedDirectiveImpl(SourceLocation HashLoc,
27642764
const LexEmbedParametersResult &Params,
2765-
StringRef BinaryContents);
2765+
StringRef BinaryContents, StringRef FileName);
27662766

27672767
// File inclusion.
27682768
void HandleIncludeDirective(SourceLocation HashLoc, Token &Tok,
@@ -3066,6 +3066,7 @@ class EmptylineHandler {
30663066
/// preprocessor to the parser through an annotation token.
30673067
struct EmbedAnnotationData {
30683068
StringRef BinaryData;
3069+
StringRef FileName;
30693070
};
30703071

30713072
/// Registry of pragma handlers added by plugins

0 commit comments

Comments
 (0)