Skip to content

Commit ee24d3f

Browse files
author
Georgios Rokos
committed
Merge from '"main"' to '"sycl-web"' (3 commits)
CONFLICT (content): Merge conflict in llvm/CMakeLists.txt CONFLICT (content): Merge conflict in README.md
2 parents b4b6ab0 + db0486c commit ee24d3f

File tree

431 files changed

+14437
-11107
lines changed

Some content is hidden

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

431 files changed

+14437
-11107
lines changed

clang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ TEST_F(LSPTest, Diagnostics) {
131131
EXPECT_THAT(Client.diagnostics("foo.cpp"),
132132
llvm::ValueIs(testing::ElementsAre(
133133
DiagMessage("Cannot initialize a variable of type 'int' with "
134-
"an lvalue of type 'const char [3]'"))));
134+
"an lvalue of type 'const char[3]'"))));
135135

136136
Client.didClose("foo.cpp");
137137
EXPECT_THAT(Client.diagnostics("foo.cpp"), llvm::ValueIs(testing::IsEmpty()));

clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ o]]();
181181
Diag(Test.range("unk"), "use of undeclared identifier 'unknown'"),
182182
Diag(Test.range("type"),
183183
"cannot initialize a variable of type 'double' with an lvalue "
184-
"of type 'const char [4]'"),
184+
"of type 'const char[4]'"),
185185
Diag(Test.range("nomember"), "no member named 'y' in 'Foo'"),
186186
Diag(Test.range("nomembernamespace"),
187187
"no member named 'test' in namespace 'test'"),

clang-tools-extra/clangd/unittests/HoverTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ class Foo {})cpp";
899899
[](HoverInfo &HI) {
900900
HI.Name = "expression";
901901
HI.Kind = index::SymbolKind::Unknown;
902-
HI.Type = "int [10]";
902+
HI.Type = "int[10]";
903903
HI.Value = "{1}";
904904
}}};
905905
for (const auto &Case : Cases) {

clang/bindings/python/tests/cindex/test_type.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ def test_type_spelling(self):
175175
self.assertIsNotNone(i)
176176
self.assertIsNotNone(x)
177177
self.assertIsNotNone(v)
178-
self.assertEqual(c.type.spelling, "int [5]")
179-
self.assertEqual(i.type.spelling, "int []")
178+
self.assertEqual(c.type.spelling, "int[5]")
179+
self.assertEqual(i.type.spelling, "int[]")
180180
self.assertEqual(x.type.spelling, "int")
181-
self.assertEqual(v.type.spelling, "int [x]")
181+
self.assertEqual(v.type.spelling, "int[x]")
182182

183183
def test_typekind_spelling(self):
184184
"""Ensure TypeKind.spelling works."""

clang/cmake/caches/CrossWinToARMLinux.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "")
101101
set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "")
102102
set(COMPILER_RT_BUILD_PROFILE OFF CACHE BOOL "")
103103
set(COMPILER_RT_BUILD_CRT OFF CACHE BOOL "")
104+
set(COMPILER_RT_BUILD_ORC OFF CACHE BOOL "")
104105
set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
105106
set(COMPILER_RT_INCLUDE_TESTS ON CACHE BOOL "")
106107

clang/include/clang/AST/Type.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6026,18 +6026,17 @@ inline ObjCProtocolDecl **ObjCTypeParamType::getProtocolStorageImpl() {
60266026
class ObjCInterfaceType : public ObjCObjectType {
60276027
friend class ASTContext; // ASTContext creates these.
60286028
friend class ASTReader;
6029-
friend class ObjCInterfaceDecl;
60306029
template <class T> friend class serialization::AbstractTypeReader;
60316030

6032-
mutable ObjCInterfaceDecl *Decl;
6031+
ObjCInterfaceDecl *Decl;
60336032

60346033
ObjCInterfaceType(const ObjCInterfaceDecl *D)
60356034
: ObjCObjectType(Nonce_ObjCInterface),
60366035
Decl(const_cast<ObjCInterfaceDecl*>(D)) {}
60376036

60386037
public:
60396038
/// Get the declaration of this interface.
6040-
ObjCInterfaceDecl *getDecl() const { return Decl; }
6039+
ObjCInterfaceDecl *getDecl() const;
60416040

60426041
bool isSugared() const { return false; }
60436042
QualType desugar() const { return QualType(this, 0); }

clang/include/clang/Basic/Attr.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2446,7 +2446,8 @@ def BPFPreserveAccessIndex : InheritableAttr,
24462446
def BTFDeclTag : InheritableAttr {
24472447
let Spellings = [Clang<"btf_decl_tag">];
24482448
let Args = [StringArgument<"BTFDeclTag">];
2449-
let Subjects = SubjectList<[Var, Function, Record, Field], ErrorDiag>;
2449+
let Subjects = SubjectList<[Var, Function, Record, Field, TypedefName],
2450+
ErrorDiag>;
24502451
let Documentation = [BTFDeclTagDocs];
24512452
let LangOpts = [COnly];
24522453
}

clang/include/clang/Basic/AttrDocs.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,9 +2064,10 @@ def BTFDeclTagDocs : Documentation {
20642064
let Content = [{
20652065
Clang supports the ``__attribute__((btf_decl_tag("ARGUMENT")))`` attribute for
20662066
all targets. This attribute may be attached to a struct/union, struct/union
2067-
field, function, function parameter or variable declaration. If -g is specified,
2068-
the ``ARGUMENT`` info will be preserved in IR and be emitted to dwarf.
2069-
For BPF targets, the ``ARGUMENT`` info will be emitted to .BTF ELF section too.
2067+
field, function, function parameter, variable or typedef declaration. If -g is
2068+
specified, the ``ARGUMENT`` info will be preserved in IR and be emitted to
2069+
dwarf. For BPF targets, the ``ARGUMENT`` info will be emitted to .BTF ELF
2070+
section too.
20702071
}];
20712072
}
20722073

clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct ModuleDeps {
101101
bool ImportedByMainFile = false;
102102

103103
/// Compiler invocation that can be used to build this module (without paths).
104-
CompilerInvocation Invocation;
104+
CompilerInvocation BuildInvocation;
105105

106106
/// Gets the canonical command line suitable for passing to clang.
107107
///
@@ -141,8 +141,7 @@ class ModuleDepCollector;
141141
/// \c DependencyConsumer of the parent \c ModuleDepCollector.
142142
class ModuleDepCollectorPP final : public PPCallbacks {
143143
public:
144-
ModuleDepCollectorPP(CompilerInstance &I, ModuleDepCollector &MDC)
145-
: Instance(I), MDC(MDC) {}
144+
ModuleDepCollectorPP(ModuleDepCollector &MDC) : MDC(MDC) {}
146145

147146
void FileChanged(SourceLocation Loc, FileChangeReason Reason,
148147
SrcMgr::CharacteristicKind FileType,
@@ -159,8 +158,6 @@ class ModuleDepCollectorPP final : public PPCallbacks {
159158
void EndOfMainFile() override;
160159

161160
private:
162-
/// The compiler instance for the current translation unit.
163-
CompilerInstance &Instance;
164161
/// The parent dependency collector.
165162
ModuleDepCollector &MDC;
166163
/// Working set of direct modular dependencies.
@@ -193,7 +190,7 @@ class ModuleDepCollectorPP final : public PPCallbacks {
193190
class ModuleDepCollector final : public DependencyCollector {
194191
public:
195192
ModuleDepCollector(std::unique_ptr<DependencyOutputOptions> Opts,
196-
CompilerInstance &I, DependencyConsumer &C,
193+
CompilerInstance &ScanInstance, DependencyConsumer &C,
197194
CompilerInvocation &&OriginalCI, bool OptimizeArgs);
198195

199196
void attachToPreprocessor(Preprocessor &PP) override;
@@ -202,8 +199,8 @@ class ModuleDepCollector final : public DependencyCollector {
202199
private:
203200
friend ModuleDepCollectorPP;
204201

205-
/// The compiler instance for the current translation unit.
206-
CompilerInstance &Instance;
202+
/// The compiler instance for scanning the current translation unit.
203+
CompilerInstance &ScanInstance;
207204
/// The consumer of collected dependency information.
208205
DependencyConsumer &Consumer;
209206
/// Path to the main source file.

clang/lib/ARCMigrate/ObjCMT.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,8 @@ static void rewriteToObjCProperty(const ObjCMethodDecl *Getter,
487487

488488
// Short circuit 'delegate' properties that contain the name "delegate" or
489489
// "dataSource", or have exact name "target" to have 'assign' attribute.
490-
if (PropertyName.equals("target") ||
491-
(PropertyName.find("delegate") != StringRef::npos) ||
492-
(PropertyName.find("dataSource") != StringRef::npos)) {
490+
if (PropertyName.equals("target") || PropertyName.contains("delegate") ||
491+
PropertyName.contains("dataSource")) {
493492
QualType QT = Getter->getReturnType();
494493
if (!QT->isRealType())
495494
append_attr(PropertyString, "assign", LParenAdded);

0 commit comments

Comments
 (0)