================ @@ -503,6 +503,10 @@ bool Scanner::lexModuleDirectiveBody(DirectiveKind Kind, const char *&First, diag::err_dep_source_scanner_missing_semi_after_at_import); if (Tok.is(tok::semi)) break; + if (Tok.is(tok::hash) || Tok.is(tok::at)) + return reportError( ---------------- akyrtzi wrote:
IMHO there's no benefit in emitting an error during minimization, unless there's a reason that the frontend cannot emit a proper diagnostic during compilation. The scanner's primary focus should be on identifying dependencies; invalid code can be reported by the frontend. https://github.com/llvm/llvm-project/pull/142452 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits