efriedma-quic wrote:

There's one other possibility... you could make "deferred" diagnostics not 
defer diagnosing quite so much.  If the function is defined in a way that it 
inherently must be emitted, or it's already been odr-used, there's no point to 
actually deferring the diagnostic: we know we'll emit it eventually.  
Otherwise, we wait until we see an ODR-use of the function: if we see such a 
use, we immediately diagnose that use.  But I'm not quite sure how you deal 
with a function that's declared early, then defined inline later in the file; 
you'd need to recursively scan all the callers of the function.

Sticking a map in the ASTContext is probably okay.

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