llvm-project/llvm/test/TableGen/nested_ifdef.inc
Min-Yih Hsu a09f09c618 [TableGen] Fix incorrect handling of nested #ifndef directives
TableGen's lexer was unable to handle nested #ifndef when the outer
`#ifdef` / `#ifndef` scope is subject to skip. This was caused by returning
the canonicalized token when it should have returned the original one.

Fix #65100.

Differential Revision: https://reviews.llvm.org/D159236
2023-09-07 12:42:22 -07:00

11 lines
91 B
C++

#ifndef NESTED_IFDEF
#define NESTED_IFDEF
def foo;
#ifndef HAHA
def haha;
#endif
#endif