https://github.com/shader-slang/slang
Raw File
Tip revision: a95fe92dafbd2a2e718bb4aac090a7156a46e79b authored by Yong He on 20 September 2022, 22:44:16 UTC
Use `printf` in tests. (#2406)
Tip revision: a95fe92
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