Skip to content

Commit 0470406

Browse files
authored
Merge pull request #40230 from CodaFi/noreturn-of-the-king
Silence Some Warnings
2 parents d034448 + 924d15b commit 0470406

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2206,8 +2206,8 @@ ClangImporter::Implementation::Implementation(
22062206
EnableClangSPI(ctx.ClangImporterOpts.EnableClangSPI),
22072207
IsReadingBridgingPCH(false),
22082208
CurrentVersion(ImportNameVersion::fromOptions(ctx.LangOpts)),
2209-
BridgingHeaderLookupTable(new SwiftLookupTable(nullptr)),
22102209
BuffersForDiagnostics(ctx.SourceMgr),
2210+
BridgingHeaderLookupTable(new SwiftLookupTable(nullptr)),
22112211
platformAvailability(ctx.LangOpts), nameImporter(),
22122212
DisableSourceImport(ctx.ClangImporterOpts.DisableSourceImport),
22132213
DWARFImporter(dwarfImporterDelegate) {}

lib/Demangling/Demangler.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ static bool isRequirement(Node::Kind kind) {
9191
// Public utility functions //
9292
//////////////////////////////////
9393

94-
LLVM_NODISCARD void swift::Demangle::failAssert(const char *file, unsigned line,
95-
NodePointer node,
96-
const char *expr) {
94+
LLVM_ATTRIBUTE_NORETURN void swift::Demangle::failAssert(const char *file,
95+
unsigned line,
96+
NodePointer node,
97+
const char *expr) {
9798
fprintf(stderr, "%s:%u: assertion failed for Node %p: %s", file, line, node,
9899
expr);
99100
abort();

lib/Demangling/DemanglerAssert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ namespace swift {
5151
namespace Demangle {
5252
SWIFT_BEGIN_INLINE_NAMESPACE
5353

54-
LLVM_NODISCARD void failAssert(const char *file, unsigned line,
55-
NodePointer node, const char *expr);
54+
LLVM_ATTRIBUTE_NORETURN void failAssert(const char *file, unsigned line,
55+
NodePointer node, const char *expr);
5656

5757
SWIFT_END_INLINE_NAMESPACE
5858
} // end namespace Demangle

0 commit comments

Comments
 (0)