https://github.com/shader-slang/slang
Raw File
Tip revision: 83514bd25160a9af91abc1b9acd7e44657447526 authored by Yong He on 21 September 2020, 15:27:10 UTC
Enable all dynamic dispatch tests on CUDA. (#1552)
Tip revision: 83514bd
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