Commit Graph

6 Commits

Author SHA1 Message Date
Anthony Latsis
2cd90bdd69 AST: Quote attributes more consistently in DiagnosticsSema.def 2025-04-22 18:23:36 +01:00
Doug Gregor
5df96a7a6e Turn pretty-printing of a declaration into a request
The diagnostics engine has some code to pretty-print a declaration when
there is no source location for that declaration. The declaration is
pretty-printed into a source buffer, and a source location into that
buffer is synthesizes. This applies to synthesized declarations as well
as those imported from Swift modules (without source code) or from Clang.

Reimplement this pretty-printing for declarations as a request. In
doing so, change the manner in which we do the printing: the
diagnostics engine printed the entire enclosing type into a buffer
whose name was the module + that type. This meant that the buffer was
shared by every member of that type, but also meant that we would end
up deserializing a lot of declarations just for printing and
potentially doing a lot more work for these diagnostics.
2024-10-01 15:49:15 -07:00
Doug Gregor
69ab4fc56c Use LLVM diagnostic style for a number of Clang importer tests
These tests are checking the printed outpout of the diagnostic formatter
in ways that change with the Swift formatter, but are not consequential.
2024-02-19 02:48:36 -10:00
Robert Widmann
3790d5e277 [Gardening] overriden -> overridden 2021-02-08 11:22:57 -08:00
Minhyuk Kim
5c21cdf4a6 Modify override_decl_extension error to be more descriptive 2021-01-23 01:04:40 +09:00
Robert Widmann
a1397a8c60 [Sema] Don't Emit @objc Fixits Into Extant Modules
Overlays are specifically allowed to do magic things that regular Swift
modules are not. In this case, the UIImage and NSImage overlays have
extensions that allow them to conform to `_ExpressibleByImageLiteral`.
This, unfortunately, means that subclassing these classes with the
overlays present is impossible as one must override the required
initializers, but one cannot override these initializers since they are
declared in an extension.

While we cannot correct the overlays without breaking ABI, we can at
least make sure we don't attempt to stick @objc into them when users
have a go at subclassing these classes.

Resolves rdar://59610201
2020-03-02 16:27:06 -08:00