https://github.com/shader-slang/slang
Raw File
Tip revision: 7cff340b10b27f82781335093759bbdc19cd2865 authored by Yong He on 21 January 2022, 20:13:23 UTC
Add entry-point name override feature. (#2089)
Tip revision: 7cff340
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