mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Suppress warning about useless availability checks in playgrounds and immediate mode.
We normally report a warning when a #available() check will always be true because of the minimum deployment target. These warnings are potentially annoying when the developer either cannot change the minimum deployment target from the default (as in playgrounds) or when doing so is burdensome (as for interpreted command-line scripts, which would require passing a target triple) -- so suppress them. The is a updated version of the reverted r29582, which didn't check for immediate mode properly. rdar://problem/21324005 Swift SVN r29646
This commit is contained in:
@@ -406,6 +406,9 @@ void CompilerInstance::performSema() {
|
||||
if (Invocation.getFrontendOptions().DebugTimeFunctionBodies) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::DebugTimeFunctionBodies;
|
||||
}
|
||||
if (Invocation.getFrontendOptions().actionIsImmediate()) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::ForImmediateMode;
|
||||
}
|
||||
|
||||
// Parse the main file last.
|
||||
if (MainBufferID != NO_SUCH_BUFFER) {
|
||||
|
||||
Reference in New Issue
Block a user