https://github.com/shader-slang/slang
Raw File
Tip revision: f88e1299b7715190ce82f3f4473f0d0eeaa2000e authored by Yong He on 23 May 2023, 22:19:27 UTC
Add API for querying total compile time. (#2898)
Tip revision: f88e129
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