Commit Graph

9 Commits

Author SHA1 Message Date
Doug Gregor
a51a172035 Make a few tests independent of the default diagnostic style 2024-02-19 02:48:36 -10:00
Robert Widmann
b8dc4f0a3f Use TypeCheckerOptions to simplify FunctionBodyTimer 2019-11-12 09:56:02 -08:00
Robert Widmann
d6fe1e9d39 Teach IRGen to Emit Invalid @objc Enums
In order to remove the enum raw value check request in validateDecl,
IRGen must now tolerate recieving an invalid raw value expression.
Switch the assert to instead check for this condition and emit an
invalid negative discriminator.
2019-10-14 15:29:43 -07:00
Slava Pestov
6828a12416 Sema: Remove unnecessary circularity breaks 2019-10-03 17:11:45 -04:00
Robert Widmann
233f8645d1 Move some more common enum diagnostics into the decl checker
In preparation for checkEnumRawValues being turned into a request, move the common diagnostics to the decl checker so they're always emitted at the right time.
2019-09-26 11:07:03 -07:00
Doug Gregor
53d60f9cf1 [Type checker] Clean up enum @objc/raw type checking.
@objc enums have special requirements on the raw type, which were
enforced as part of checking the raw type of the enum. Rework the
checking here so that the additional constraints are part of resolving
whether the enum is exposed to Objective-C. This keeps raw-type
computation more independent and “lower-level” than @objc computation.

Once reworked, eliminate the “CIntegerTypes” cache from TypeChecker:
it probably doesn't matter, and the caching should be performed by the
request-evaluator rather than the type checker.
2018-07-05 15:37:46 -07: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
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Jordan Rose
12c80f4a3a Check the raw values of an @objc enum eagerly during decl validation.
For @objc enums, raw values determine the representation values, so we have
to compute them eagerly in order for switch statements to work. Similarly,
if the enum is broken, we have to /fail/ eagerly so that we don't fall down
later on in IRGen.

rdar://problem/19775284

Swift SVN r25282
2015-02-13 20:31:43 +00:00