https://github.com/shader-slang/slang
Raw File
Tip revision: 8487678d6504459935fec07886d2e53ed688ac2f authored by jsmall-nvidia on 08 October 2022, 22:48:34 UTC
Fixes around byte decode lite (#2438)
Tip revision: 8487678
undef.slang
//TEST:SIMPLE:
// #undef support

// warning: undef of something not defined
#undef FOO

#define BAR 1.0f

float foo() { return BAR + 2.0; }

#ifdef BAR
// okay
#else
#error not okay
#endif

#undef BAR

typedef float BAR;

BAR bar() { return 2.0; }

#if !defined(BAR)
// okay
#else
#error not okay
#endif


#define FOO

#undef FOO
back to top