https://github.com/shader-slang/slang
Raw File
Tip revision: cbe245f86ba6cbf5239f36bd6a0f55d82229d19b authored by Yong He on 29 September 2022, 20:14:10 UTC
GFX: support D3D12EnableExperimentalFeatures. (#2424)
Tip revision: cbe245f
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