Skip to content

Commit 05dbd05

Browse files
authored
Merge pull request swiftlang#70943 from tshortli/resolve-more-warnings
Resolve more warnings
2 parents 1bc76a4 + 064afb9 commit 05dbd05

File tree

19 files changed

+45
-12
lines changed

19 files changed

+45
-12
lines changed

lib/Demangling/Errors.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ static void reportNow(uint32_t flags, const char *message) {
102102
fflush(stderr);
103103
#endif
104104
#if SWIFT_STDLIB_HAS_ASL
105+
#pragma clang diagnostic push
106+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
105107
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
108+
#pragma clang diagnostic pop
106109
#elif defined(__ANDROID__) && !defined(__TERMUX__)
107110
__android_log_print(ANDROID_LOG_FATAL, "SwiftDemangle", "%s", message);
108111
#endif

lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
#include "llvm/Support/Debug.h"
5252
#include "llvm/Support/ErrorHandling.h"
5353
#include "llvm/Support/FileSystem.h"
54-
#include "llvm/Support/Host.h"
5554
#include "llvm/Support/MD5.h"
5655
#include "llvm/Support/Path.h"
5756
#include "llvm/Support/PrettyStackTrace.h"
5857
#include "llvm/Support/raw_ostream.h"
58+
#include "llvm/TargetParser/Host.h"
5959

6060
#include "CompilationRecord.h"
6161

lib/Driver/FrontendUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "llvm/ADT/DenseSet.h"
2222
#include "llvm/Option/ArgList.h"
2323
#include "llvm/Support/CommandLine.h"
24-
#include "llvm/Support/Host.h"
2524
#include "llvm/Support/StringSaver.h"
25+
#include "llvm/TargetParser/Host.h"
2626

2727
using namespace swift;
2828
using namespace swift::driver;

lib/DriverTool/driver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@
3232
#include "swift/FrontendTool/FrontendTool.h"
3333
#include "swift/DriverTool/DriverTool.h"
3434
#include "llvm/ADT/SmallVector.h"
35-
#include "llvm/TargetParser/Triple.h"
3635
#include "llvm/Support/CommandLine.h"
3736
#include "llvm/Support/ConvertUTF.h"
3837
#include "llvm/Support/Errno.h"
3938
#include "llvm/Support/FileSystem.h"
40-
#include "llvm/Support/Host.h"
39+
#include "llvm/TargetParser/Host.h"
4140
#include "llvm/Support/ManagedStatic.h"
4241
#include "llvm/Support/Path.h"
4342
#include "llvm/Support/PrettyStackTrace.h"
@@ -47,6 +46,8 @@
4746
#include "llvm/Support/StringSaver.h"
4847
#include "llvm/Support/TargetSelect.h"
4948
#include "llvm/Support/raw_ostream.h"
49+
#include "llvm/TargetParser/Host.h"
50+
#include "llvm/TargetParser/Triple.h"
5051

5152
#include <memory>
5253
#include <stdlib.h>

lib/DriverTool/swift_llvm_opt_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
#include "llvm/MC/TargetRegistry.h"
5757
#include "llvm/Support/Debug.h"
5858
#include "llvm/Support/FileSystem.h"
59-
#include "llvm/Support/Host.h"
6059
#include "llvm/Support/ManagedStatic.h"
6160
#include "llvm/Support/PluginLoader.h"
6261
#include "llvm/Support/PrettyStackTrace.h"
@@ -66,6 +65,7 @@
6665
#include "llvm/Support/TargetSelect.h"
6766
#include "llvm/Support/ToolOutputFile.h"
6867
#include "llvm/Target/TargetMachine.h"
68+
#include "llvm/TargetParser/Host.h"
6969
#include "llvm/Transforms/Scalar/LoopPassManager.h"
7070

7171
using namespace swift;

lib/Parse/ParseDecl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7928,7 +7928,6 @@ void Parser::parseExpandedMemberList(SmallVectorImpl<ASTNode> &items) {
79287928
if (Tok.is(tok::NUM_TOKENS))
79297929
consumeTokenWithoutFeedingReceiver();
79307930

7931-
auto *decl = CurDeclContext->getAsDecl();
79327931
bool previousHadSemi = true;
79337932

79347933
SourceLoc startingLoc = Tok.getLoc();

lib/Serialization/Deserialization.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7629,7 +7629,6 @@ class SwiftToClangBasicReader :
76297629
if (!rawKind)
76307630
return nullptr;
76317631

7632-
clang::attr::Kind attrKind = static_cast<clang::attr::Kind>(rawKind - 1);
76337632
auto name = readIdentifier();
76347633
auto scopeName = readIdentifier();
76357634

stdlib/public/Concurrency/Actor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,10 @@ void swift::swift_task_reportUnexpectedExecutor(
426426
fflush(stderr);
427427
#endif
428428
#if SWIFT_STDLIB_HAS_ASL
429+
#pragma clang diagnostic push
430+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
429431
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
432+
#pragma clang diagnostic pop
430433
#elif defined(__ANDROID__)
431434
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
432435
#endif

stdlib/public/Concurrency/TaskGroup.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ struct TaskGroupStatus {
594594
write(STDERR_FILENO, message, strlen(message));
595595
#endif
596596
#if defined(SWIFT_STDLIB_HAS_ASL)
597+
#pragma clang diagnostic push
598+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
597599
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
600+
#pragma clang diagnostic pop
598601
#elif defined(__ANDROID__)
599602
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
600603
#endif

stdlib/public/Concurrency/TaskLocal.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ static void swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroupImpl(
294294
fflush(stderr);
295295
#endif
296296
#if SWIFT_STDLIB_HAS_ASL
297+
#pragma clang diagnostic push
298+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
297299
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
300+
#pragma clang diagnostic pop
298301
#elif defined(__ANDROID__)
299302
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
300303
#endif

0 commit comments

Comments
 (0)