https://github.com/shader-slang/slang
Raw File
Tip revision: f04bd9d166d64cf318e82ea05d7c0f92affb94df authored by Yong He on 27 June 2022, 01:07:54 UTC
Fix clang-format discovery logic.
Tip revision: f04bd9d
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