https://github.com/shader-slang/slang
Raw File
Tip revision: 393e25fd2e2b8c5ff82ff4c6b14a9d7152d37a5e authored by Tim Foley on 18 December 2017, 23:14:59 UTC
Work on getting rewriter + IR playing nice together. (#314)
Tip revision: 393e25f
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