https://github.com/shader-slang/slang
Raw File
Tip revision: f7431f96e1cad2a68534bebc1f25cd6f65f87f82 authored by Yong He on 16 March 2023, 06:26:14 UTC
Fix `transcribeConstruct` for `makeStruct`. (#2703)
Tip revision: f7431f9
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