efriedma-quic wrote:

We shouldn't have invalid decls unless we've emitted an error.

If we're making some decision like "this function is an error if it's used as a 
host function", we should probably be marking the FunctionDecl explicitly with 
that decision, and CodeGen shouldn't try to emit such a function.

Also, the decision whether a function counts as "used" should probably be 
driven by Sema.  Currently you don't get errors at all with -fsyntax-only.

https://github.com/llvm/llvm-project/pull/147163
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to