swift
78b89b20 - Parse expression macro expansion buffers as expressions

Commit
1 year ago
Parse expression macro expansion buffers as expressions This started out as a crash, where an expression macro could not be defined in terms of one of the builtin macros (e.g., `#line`), because we were expecting a macro expansion expression but didn't get one. Easy fix. However, this uncovered a second bug, which is that we couldn't handle an expression macro expansino to `#line`. This is because we were parsing the macro expansion buffer as "top level items", which treats `#line` at the start of a line as a deprecated alias of `#sourceLocation`. Switch over to parsing a single expression in these contexts, and fix up an issue where `#isolation` didn't even have that expression. Fixes rdar://139372780.
Author
Committer
Parents
Loading