https://github.com/shader-slang/slang
Raw File
Tip revision: a0174d819c731e08c7a5a5d3c6e6f425d65e7187 authored by Tim Foley on 11 February 2020, 14:44:15 UTC
Make fixes for the attribute-error test case. (#1215)
Tip revision: a0174d8
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