================
@@ -544,7 +544,7 @@ Scanner::lexIncludeFilename(const char *&First, const char
*const End) {
void Scanner::lexPPDirectiveBody(const char *&First, const char *const End) {
while (true) {
const dependency_directives_scan::Token &Tok = lexToken(First, End);
- if (Tok.is(tok::eod))
+ if (Tok.is(tok::eod) || Tok.is(tok::eof))
----------------
cyndyishida wrote:
If I understand you correctly, that's actually what happened before I added the
`skipDirective` on [line
905](https://github.com/llvm/llvm-project/pull/99520/files#diff-ee296172b8a9dd81c5185e78a512c2fc89f7abfe5b2d035e96537fce7dbbbc9cR905)
Previously, input that was macro or header-guarded would fail with
```
error: unterminated conditional directive
```
because the directive line for the `include` absorbed up the `#endif`.
https://github.com/llvm/llvm-project/pull/99520
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits