zoecarver added a comment.

> So. I think the status quo is OK but not great; we accept invalid code, in 
> the name of MSVC compatibility, that MSVC doesn't accept. I don't think 
> following MSVC would be a good thing, as that'd lead to our rejecting valid 
> code (that MSVC also rejects but that we currently accept). If we can split 
> the difference, and eagerly instantiate only in the case where the language 
> rules say the variable is not inline but MSVC says it is inline, that would 
> be an improvement, but it seems awkward as I think we've already lost the 
> relevant information by the point we need to make the decision.

I agree. And, I think you're right about the fact that we've unfortunately lost 
the relevant info at the point. Even though it's a C++17 extension, someone 
could make `value` inline explicitly (as is done in your Godbolt) and we'd 
still error pre-c++17. Based on that, I'm going to close this for now. But if 
you (or someone else) thinks of another solution, or reason that it would be 
good to move forward with this, I'd be happy to re-open it and continue to work 
on it.

Thanks for all the help with this bug and patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98904/new/

https://reviews.llvm.org/D98904

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to