Skip to content

Commit 8b7c4e4

Browse files
authored
merge main into amd-staging (llvm#2098)
2 parents a2974c5 + f85ba43 commit 8b7c4e4

File tree

277 files changed

+9431
-9144
lines changed

Some content is hidden

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

277 files changed

+9431
-9144
lines changed

.github/new-prs-labeler.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,12 @@ lld:wasm:
791791
- lld/**/wasm/**
792792
- lld/Common/**
793793

794+
backend:ARC:
795+
- llvm/lib/Target/ARC/**
796+
- clang/lib/Basic/Targets/ARC.h
797+
- clang/lib/Basic/Targets/ARC.cpp
798+
- clang/lib/CodeGen/Targets/ARC.cpp
799+
794800
backend:ARM:
795801
- llvm/include/llvm/IR/IntrinsicsARM.td
796802
- llvm/test/MC/ARM/**
@@ -817,6 +823,19 @@ backend:AArch64:
817823
- clang/include/clang/Sema/SemaARM.h
818824
- clang/lib/Sema/SemaARM.cpp
819825

826+
backend:CSKY:
827+
- llvm/lib/Target/CSKY/**
828+
- llvm/include/llvm/TargetParser/CSKYTargetParser.def
829+
- llvm/include/llvm/TargetParser/CSKYTargetParser.h
830+
- llvm/include/llvm/BinaryFormat/ELFRelocs/CSKY.def
831+
- llvm/lib/TargetParser/CSKYTargetParser.cpp
832+
- llvm/lib/Support/CSKYAttributes.cpp
833+
- llvm/lib/Support/CSKYAttributeParser.cpp
834+
- clang/lib/Basic/Targets/CSKY.h
835+
- clang/lib/Basic/Targets/CSKY.cpp
836+
- clang/lib/CodeGen/Targets/CSKY.cpp
837+
- clang/lib/Driver/ToolChains/CSKY*
838+
820839
backend:Hexagon:
821840
- clang/include/clang/Basic/BuiltinsHexagon*.def
822841
- clang/include/clang/Sema/SemaHexagon.h
@@ -840,6 +859,13 @@ backend:Hexagon:
840859
- llvm/test/MC/Hexagon/**
841860
- llvm/test/tools/llvm-objdump/ELF/Hexagon/**
842861

862+
backend:Lanai:
863+
- llvm/lib/Target/Lanai/**
864+
- clang/lib/Basic/Targets/Lanai.h
865+
- clang/lib/Basic/Targets/Lanai.cpp
866+
- clang/lib/CodeGen/Targets/Lanai.cpp
867+
- clang/lib/Driver/ToolChains/Lanai*
868+
843869
backend:loongarch:
844870
- llvm/include/llvm/IR/IntrinsicsLoongArch.td
845871
- llvm/test/MC/LoongArch/**

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ bool DataAggregator::checkPerfDataMagic(StringRef FileName) {
350350
}
351351

352352
void DataAggregator::parsePreAggregated() {
353-
std::string Error;
354-
355353
ErrorOr<std::unique_ptr<MemoryBuffer>> MB =
356354
MemoryBuffer::getFileOrSTDIN(Filename);
357355
if (std::error_code EC = MB.getError()) {

clang-tools-extra/clangd/DumpAST.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
124124
return Result;
125125
}
126126
std::string getKind(const TypeLoc &TL) {
127-
std::string Result;
128127
if (TL.getTypeLocClass() == TypeLoc::Qualified)
129128
return "Qualified";
130129
return TL.getType()->getTypeClassName();

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ TEST(SerializationTest, NoCrashOnBadStringTableSize) {
433433
std::string CorruptStri =
434434
(llvm::fromHex("ffffffff") + Stri->Data.drop_front(4)).str();
435435
Stri->Data = CorruptStri;
436-
std::string FileDigest = llvm::fromHex("EED8F5EAF25C453C");
437436

438437
// Try to crash rather than hang on large allocation.
439438
ScopedMemoryLimit MemLimit(1000 * 1024 * 1024); // 1GB

clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ mapInputsToAbsPaths(clang::tooling::CompilationDatabase &CDB,
344344
}
345345
for (const auto &Cmd : Cmds) {
346346
llvm::SmallString<256> CDBPath(Cmd.Filename);
347-
std::string Directory(Cmd.Directory);
348347
llvm::sys::fs::make_absolute(Cmd.Directory, CDBPath);
349348
CDBToAbsPaths[std::string(CDBPath)] = std::string(AbsPath);
350349
}

clang-tools-extra/modularize/Modularize.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -357,13 +357,9 @@ getModularizeArgumentsAdjuster(DependencyMap &Dependencies) {
357357
std::string InputFile = findInputFile(Args);
358358
DependentsVector &FileDependents = Dependencies[InputFile];
359359
CommandLineArguments NewArgs(Args);
360-
if (int Count = FileDependents.size()) {
361-
for (int Index = 0; Index < Count; ++Index) {
362-
NewArgs.push_back("-include");
363-
std::string File(std::string("\"") + FileDependents[Index] +
364-
std::string("\""));
365-
NewArgs.push_back(FileDependents[Index]);
366-
}
360+
for (const std::string &Dep : FileDependents) {
361+
NewArgs.push_back("-include");
362+
NewArgs.push_back(Dep);
367363
}
368364
// Ignore warnings. (Insert after "clang_tool" at beginning.)
369365
NewArgs.insert(NewArgs.begin() + 1, "-w");
@@ -381,11 +377,11 @@ getModularizeArgumentsAdjuster(DependencyMap &Dependencies) {
381377
// somewhere into Tooling/ in mainline
382378
struct Location {
383379
OptionalFileEntryRef File;
384-
unsigned Line, Column;
380+
unsigned Line = 0, Column = 0;
385381

386-
Location() : File(), Line(), Column() {}
382+
Location() = default;
387383

388-
Location(SourceManager &SM, SourceLocation Loc) : File(), Line(), Column() {
384+
Location(SourceManager &SM, SourceLocation Loc) {
389385
Loc = SM.getExpansionLoc(Loc);
390386
if (Loc.isInvalid())
391387
return;

clang-tools-extra/modularize/PreprocessorTracker.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ static std::string getMacroUnexpandedString(clang::SourceRange Range,
381381
clang::SourceLocation BeginLoc(Range.getBegin());
382382
const char *BeginPtr = PP.getSourceManager().getCharacterData(BeginLoc);
383383
size_t Length;
384-
std::string Unexpanded;
385384
if (MI->isFunctionLike()) {
386385
clang::SourceLocation EndLoc(Range.getEnd());
387386
const char *EndPtr = PP.getSourceManager().getCharacterData(EndLoc) + 1;
@@ -1328,7 +1327,6 @@ void PreprocessorCallbacks::Defined(const clang::Token &MacroNameTok,
13281327
clang::SourceLocation Loc(Range.getBegin());
13291328
clang::IdentifierInfo *II = MacroNameTok.getIdentifierInfo();
13301329
const clang::MacroInfo *MI = MD.getMacroInfo();
1331-
std::string MacroName = II->getName().str();
13321330
std::string Unexpanded(getSourceString(PP, Range));
13331331
PPTracker.addMacroExpansionInstance(
13341332
PP, PPTracker.getCurrentHeaderHandle(), Loc,

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,10 @@ Improvements to Clang's diagnostics
533533

534534
- Improved the ``-Wtautological-overlap-compare`` diagnostics to warn about overlapping and non-overlapping ranges involving character literals and floating-point literals.
535535
The warning message for non-overlapping cases has also been improved (#GH13473).
536-
536+
537+
- Fixed a duplicate diagnostic when performing typo correction on function template
538+
calls with explicit template arguments. (#GH139226)
539+
537540
Improvements to Clang's time-trace
538541
----------------------------------
539542

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -909,13 +909,13 @@ interp::Context &ASTContext::getInterpContext() {
909909
if (!InterpContext) {
910910
InterpContext.reset(new interp::Context(*this));
911911
}
912-
return *InterpContext.get();
912+
return *InterpContext;
913913
}
914914

915915
ParentMapContext &ASTContext::getParentMapContext() {
916916
if (!ParentMapCtx)
917917
ParentMapCtx.reset(new ParentMapContext(*this));
918-
return *ParentMapCtx.get();
918+
return *ParentMapCtx;
919919
}
920920

921921
static bool isAddrSpaceMapManglingEnabled(const TargetInfo &TI,
@@ -13066,7 +13066,7 @@ bool ASTContext::isNearlyEmpty(const CXXRecordDecl *RD) const {
1306613066
}
1306713067

1306813068
VTableContextBase *ASTContext::getVTableContext() {
13069-
if (!VTContext.get()) {
13069+
if (!VTContext) {
1307013070
auto ABI = Target->getCXXABI();
1307113071
if (ABI.isMicrosoft())
1307213072
VTContext.reset(new MicrosoftVTableContext(*this));

clang/lib/AST/ByteCode/Context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Context final {
105105
}
106106

107107
/// Returns the program. This is only needed for unittests.
108-
Program &getProgram() const { return *P.get(); }
108+
Program &getProgram() const { return *P; }
109109

110110
unsigned collectBaseOffset(const RecordDecl *BaseDecl,
111111
const RecordDecl *DerivedDecl) const;

0 commit comments

Comments
 (0)