Skip to content

Commit 16a6536

Browse files
authored
Merge pull request #82187 from tshortli/warnings
Address some warnings
2 parents a35c112 + 71eede2 commit 16a6536

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/IDE/SourceEntityWalker.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,6 @@ bool SemaAnnotator::passCallAsFunctionReference(ValueDecl *D, SourceLoc Loc,
861861

862862
bool SemaAnnotator::
863863
passReference(ValueDecl *D, Type Ty, DeclNameLoc Loc, ReferenceMetaData Data) {
864-
SourceManager &SM = D->getASTContext().SourceMgr;
865-
SourceLoc BaseStart = Loc.getBaseNameLoc(), BaseEnd = BaseStart;
866864
return passReference(D, Ty, Loc.getBaseNameLoc(), Loc.getSourceRange(), Data);
867865
}
868866

stdlib/private/StdlibUnittest/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ endif()
1111

1212
set(swift_stdlib_unittest_compile_flags
1313
"-Xfrontend" "-disable-objc-attr-requires-foundation-module")
14+
15+
list(APPEND swift_stdlib_unittest_compile_flags "-enable-experimental-feature" "Lifetimes")
16+
1417
if (SWIFT_RUNTIME_ENABLE_LEAK_CHECKER)
1518
list(APPEND swift_stdlib_unittest_compile_flags "-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER")
1619
endif()

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ public func expectNil<T>(_ value: T?,
752752
}
753753

754754
@discardableResult
755-
@lifetime(copy value)
755+
@_lifetime(copy value)
756756
public func expectNotNil<T: ~Copyable & ~Escapable>(
757757
_ value: consuming T?,
758758
_ message: @autoclosure () -> String = "",

0 commit comments

Comments
 (0)