Skip to content

Commit 19452f6

Browse files
authored
Merge branch 'main' into relax_muldc3_test
2 parents 8aa6469 + f616127 commit 19452f6

File tree

25 files changed

+69
-178
lines changed

25 files changed

+69
-178
lines changed

clang/docs/InternalsManual.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ wording a diagnostic.
139139
you mean %1?``.
140140

141141
* Appropriately capitalize proper nouns like ``Clang``, ``OpenCL``, ``GCC``,
142-
``Objective-C``, etc and language standard versions like ``C11`` or ``C++11``.
142+
``Objective-C``, etc. and language standard versions like ``C11`` or ``C++11``.
143143
* The wording should be succinct. If necessary, use a semicolon to combine
144144
sentence fragments instead of using complete sentences. e.g., prefer wording
145145
like ``'%0' is deprecated; it will be removed in a future release of Clang``
@@ -886,7 +886,7 @@ a string that the tablegen backend uses as a prefix to the
886886
LANG_OPTION_WITH_MARSHALLING([...], LangOpts->IgnoreExceptions, [...])
887887
#endif // LANG_OPTION_WITH_MARSHALLING
888888

889-
Such definition can be used used in the function for parsing and generating
889+
Such definition can be used in the function for parsing and generating
890890
command line:
891891

892892
.. code-block:: c++
@@ -1745,7 +1745,7 @@ will be found by the lookup, since it effectively replaces the first
17451745
declaration of "``f``".
17461746

17471747
(Note that because ``f`` can be redeclared at block scope, or in a friend
1748-
declaration, etc. it is possible that the declaration of ``f`` found by name
1748+
declaration, etc., it is possible that the declaration of ``f`` found by name
17491749
lookup will not be the most recent one.)
17501750

17511751
In the semantics-centric view, overloading of functions is represented
@@ -1945,7 +1945,7 @@ range of iterators over declarations of "``f``".
19451945
function ``DeclContext::getPrimaryContext`` retrieves the "primary" context for
19461946
a given ``DeclContext`` instance, which is the ``DeclContext`` responsible for
19471947
maintaining the lookup table used for the semantics-centric view. Given a
1948-
DeclContext, one can obtain the set of declaration contexts that are
1948+
``DeclContext``, one can obtain the set of declaration contexts that are
19491949
semantically connected to this declaration context, in source order, including
19501950
this context (which will be the only result, for non-namespace contexts) via
19511951
``DeclContext::collectAllContexts``. Note that these functions are used
@@ -1985,7 +1985,7 @@ broken code in the AST:
19851985
errors, the Decl node is marked as invalid.
19861986
- dropping invalid node: this often happens for errors that we don’t have
19871987
graceful recovery. Prior to Recovery AST, a mismatched-argument function call
1988-
expression was dropped though a CallExpr was created for semantic analysis.
1988+
expression was dropped though a ``CallExpr`` was created for semantic analysis.
19891989

19901990
With these strategies, clang surfaces better diagnostics, and provides AST
19911991
consumers a rich AST reflecting the written source code as much as possible even

clang/lib/Analysis/RetainSummaryManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ static bool isSubclass(const Decl *D,
147147

148148
static bool isExactClass(const Decl *D, StringRef ClassName) {
149149
using namespace ast_matchers;
150-
DeclarationMatcher sameClassM =
151-
cxxRecordDecl(hasName(std::string(ClassName)));
150+
DeclarationMatcher sameClassM = cxxRecordDecl(hasName(ClassName));
152151
return !(match(sameClassM, *D, D->getASTContext()).empty());
153152
}
154153

lldb/unittests/Symbol/TestTypeSystemClang.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,15 +1166,23 @@ TEST_F(TestTypeSystemClang, AsmLabel_CtorDtor) {
11661166
ASSERT_TRUE(ctor);
11671167
ASSERT_TRUE(dtor);
11681168

1169-
ASSERT_STREQ(m_ast->DeclGetMangledName(ctor_nolabel).GetCString(),
1169+
#ifdef _WIN32
1170+
EXPECT_STREQ(m_ast->DeclGetMangledName(ctor_nolabel).GetCString(),
1171+
"??0S@@QEAA@XZ");
1172+
EXPECT_STREQ(m_ast->DeclGetMangledName(dtor_nolabel).GetCString(),
1173+
"??1S@@QEAA@XZ");
1174+
#else
1175+
EXPECT_STREQ(m_ast->DeclGetMangledName(ctor_nolabel).GetCString(),
11701176
"_ZN1SC1Ev");
1171-
ASSERT_STREQ(m_ast->DeclGetMangledName(dtor_nolabel).GetCString(),
1177+
EXPECT_STREQ(m_ast->DeclGetMangledName(dtor_nolabel).GetCString(),
11721178
"_ZN1SD1Ev");
1173-
ASSERT_STREQ(llvm::GlobalValue::dropLLVMManglingEscape(
1179+
#endif
1180+
1181+
EXPECT_STREQ(llvm::GlobalValue::dropLLVMManglingEscape(
11741182
m_ast->DeclGetMangledName(ctor).GetStringRef())
11751183
.data(),
11761184
"$__lldb_func:0x0:0x0:S");
1177-
ASSERT_STREQ(llvm::GlobalValue::dropLLVMManglingEscape(
1185+
EXPECT_STREQ(llvm::GlobalValue::dropLLVMManglingEscape(
11781186
m_ast->DeclGetMangledName(dtor).GetStringRef())
11791187
.data(),
11801188
"$__lldb_func:0x0:0x0:~S");

llvm/include/llvm/Transforms/IPO/Attributor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6494,7 +6494,7 @@ struct AAAllocationInfo : public StateWrapper<BooleanState, AbstractAttribute> {
64946494
}
64956495

64966496
constexpr static const std::optional<TypeSize> HasNoAllocationSize =
6497-
std::optional<TypeSize>(TypeSize(-1, true));
6497+
std::make_optional<TypeSize>(-1, true);
64986498

64996499
LLVM_ABI static const char ID;
65006500
};

llvm/lib/IR/DebugInfoMetadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ DIDerivedType *DIDerivedType::getImpl(
10121012
std::optional<DIDerivedType::PtrAuthData>
10131013
DIDerivedType::getPtrAuthData() const {
10141014
return getTag() == dwarf::DW_TAG_LLVM_ptrauth_type
1015-
? std::optional<PtrAuthData>(PtrAuthData(SubclassData32))
1015+
? std::make_optional<PtrAuthData>(SubclassData32)
10161016
: std::nullopt;
10171017
}
10181018

llvm/lib/Remarks/RemarkLinker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Error RemarkLinker::link(StringRef Buffer, Format RemarkFormat) {
7070
Expected<std::unique_ptr<RemarkParser>> MaybeParser =
7171
createRemarkParserFromMeta(
7272
RemarkFormat, Buffer,
73-
PrependPath ? std::optional<StringRef>(StringRef(*PrependPath))
74-
: std::optional<StringRef>());
73+
PrependPath ? std::make_optional<StringRef>(*PrependPath)
74+
: std::nullopt);
7575
if (!MaybeParser)
7676
return MaybeParser.takeError();
7777

llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ void AArch64AsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup,
461461
Value <<= Info.TargetOffset;
462462

463463
unsigned Offset = Fixup.getOffset();
464-
assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!");
464+
assert(Offset + NumBytes <= F.getSize() && "Invalid fixup offset!");
465465

466466
// Used to point to big endian bytes.
467467
unsigned FulleSizeInBytes = getFixupKindContainereSizeInBytes(Fixup.getKind());

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void AMDGPUAsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup,
149149

150150
unsigned NumBytes = getFixupKindNumBytes(Fixup.getKind());
151151
uint32_t Offset = Fixup.getOffset();
152-
assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!");
152+
assert(Offset + NumBytes <= F.getSize() && "Invalid fixup offset!");
153153

154154
// For each byte of the fragment that the fixup touches, mask in the bits from
155155
// the fixup value.

llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ void ARMAsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup,
11251125
const unsigned NumBytes = getFixupKindNumBytes(Kind);
11261126

11271127
unsigned Offset = Fixup.getOffset();
1128-
assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!");
1128+
assert(Offset + NumBytes <= F.getSize() && "Invalid fixup offset!");
11291129

11301130
// Used to point to big endian bytes.
11311131
unsigned FullSizeBytes;

llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ void AVRAsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup,
398398
Value <<= Info.TargetOffset;
399399

400400
unsigned Offset = Fixup.getOffset();
401-
assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!");
401+
assert(Offset + NumBytes <= F.getSize() && "Invalid fixup offset!");
402402

403403
// For each byte of the fragment that the fixup touches, mask in the
404404
// bits from the fixup value.

0 commit comments

Comments
 (0)