yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

jsmall-nvidiaLiteral handling improvements (#1202)d3331fba6

master
445 B23 linesraw
1//DIAGNOSTIC_TEST:SIMPLE:
2
3
4float doSomething(float a)
5{
6    // Too large with become +inf
7    a += 5e+40;
8    // Will be narrowed to 0
9    a += 9e-50;
10    
11    double b = 0.0f;
12    
13    // These shouldn't produce warning as they can fit 
14    b += 5e+40l;
15    b += 9e-50l;
16    
17    // Cos these don't have l suffix they should also produce warnings
18    // and produce -inf and 0
19    b += -5e+40;
20    b += -9e-50;
21    
22    return a + float(b);
23}