https://github.com/shader-slang/slang
Raw File
Tip revision: 6f31eae79d5b4297d0099c5779a9806a786cf9f8 authored by Yong He on 01 March 2023, 21:19:33 UTC
Implement derivatives for HLSL intrinsics. (#2684)
Tip revision: 6f31eae
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