https://github.com/shader-slang/slang
Raw File
Tip revision: a083a37ee58dc48d92cf2b844466a295eb3e643e authored by Yong He on 10 August 2022, 22:37:19 UTC
Add `none` literal that is convertible to `Optional`. (#2356)
Tip revision: a083a37
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