https://github.com/shader-slang/slang
Raw File
Tip revision: c701013425265261076933d6b32f3353f61944cd authored by Yong He on 12 October 2023, 19:20:34 UTC
Add HitObject.GetWorldToObject. (#3273)
Tip revision: c701013
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