Commit Graph

6 Commits

Author SHA1 Message Date
Mark Lacey
8b55a0f61b SE-0054: Rework diagnostics for IUOs and revise Swift 3 /4 semantics.
For Swift 3 / 4:

Deprecate the spelling "ImplicitlyUnwrappedOptional", emitting a warning
and suggesting "!" in places where they are allowed according to
SE-0054.

In places where SE-0054 disallowed IUOs but we continued to accept them
in previous compilers, emit a warning suggesting "Optional" or "?"  as
an alternative depending on context and treat the IUO as an Optional,
noting this in the diagnostic.

For Swift 5:

Treat "ImplicitlyUnwrappedOptional" as an error, suggesting
"!" in places where they are allowed by SE-0054.

In places where SE-0054 disallowed IUOs, emit an error suggestion
"Optional" or "?" as an alternative depending on context.
2017-11-18 11:41:53 +09:00
Jordan Rose
ef47c26313 [test] Update the mock SDK's Dispatch to resemble the real one. (#7879)
This was causing the importer to complain about not being able to map
'dispatch_sync' to 'DispatchQueue.sync(self:execute:)', but only when
building the PCM for our mock Dispatch. That meant that it depended on
the test order whether we'd see issues---if the first test to build
the module didn't check for warnings in other files, it would slip by.
This was usually blocks_parse.swift.

rdar://problem/30475805
2017-03-02 19:00:50 -08:00
Ben Langmuir
cfd5418557 Disable test/ClangImporter/blocks_parse until it can be fixed
This test is failing non-deterministically.
2017-03-02 12:01:04 -08:00
Brian King
edc193efa0 Fix warnings in top level statements 2017-01-24 22:53:21 -05:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Jordan Rose
61798ff6ec [test] Rename test/ClangModules to test/ClangImporter. (#5618)
...to match the component in include/ and lib/. No content change.
2016-11-02 18:00:53 -07:00