blob: da6a45fdcf5554990f390c5e3e0c6fc58c0b577f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// if-macro.slang
//TEST:SIMPLE:
// Test that a `#if` test can invoke a function-like macro.
//
// Note: this test is a reproducer for a bug reported by a user.
#define is_valid_TEST 1
#define isValid(name) (is_valid_##name != 0)
int test() {
#if isValid(TEST)
return 1;
#else
return NO_SUCH_SYMBOL;
#endif
}
|