Peter Klausler d988991f9f
[flang] Tokenize all -D macro bodies, and do it better (#168116)
The compiler presently tokenizes the bodies of only function-like macro
definitions from the command line, and does so crudely. Tokenize
keyword-like macros too, get character literals right, and handle
numeric constants correctly. (Also delete two needless functions noticed
in characters.h.)

Fixes https://github.com/llvm/llvm-project/issues/168077.
2025-11-19 08:53:59 -08:00

7 lines
101 B
Fortran

!RUN: %flang -E -DNVAR=2+1+0+0 %s 2>&1 | FileCheck %s
!CHECK: pass
#if NVAR > 2
call pass
#endif
end