Commit Graph

5 Commits

Author SHA1 Message Date
Chris Lattner
fa4f1d86ee Recommit r27756 with an update to diagnostic_constant_propagation_int.swift, which is iOS only.
Swift SVN r27761
2015-04-26 15:56:41 +00:00
Ted Kremenek
4a227f2661 Speculatively revert "fix <rdar://problem/18213320> enum with raw values that are too big are not diagnosed"
This looks like it caused test 'SILPasses/diagnostic_constant_propagation_int.swift' to fail.

Swift SVN r27757
2015-04-26 15:12:58 +00:00
Chris Lattner
d5ae69b276 fix <rdar://problem/18213320> enum with raw values that are too big are not diagnosed
On that testcase, we now generate:

t.swift:8:22: error: integer literal '123456' overflows when stored into 'UInt8'
  case tooFarByFar = 123456
                     ^
t.swift:7:8: error: integer literal '256' overflows when stored into 'UInt8'
  case twoHundredFiftySix
       ^

instead of spitting out some warnings with no source loc (which Xcode eats).


This patch:
 - Propagates source locations for literals when synthesizing code in various places,
   so we get the right diagnostic at the right spot.
 - Improves the constant folding SIL Pass to print the value overflowing, which is
   necessary for cases with an implicit value (like 256 above), and is general goodness
   for the QoI of the diagnostic anyway.



Swift SVN r27756
2015-04-26 06:21:23 +00:00
Dmitri Hrybenko
6058d291ca CMake: allow the SDK overlay to be built separately from the compiler
and the stdandard library

rdar://19703353

Swift SVN r25139
2015-02-10 21:57:03 +00:00
Dmitri Hrybenko
b47ad7f364 Perform SIL linking when running code in REPL
This allows us to inline transparent functions and emit diagnostics in SIL
diagnostic passes.  Fixes rdar://15209827


Swift SVN r9280
2013-10-13 11:53:43 +00:00