[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (#84050)" (PR #90152)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu May 2 06:18:25 PDT 2024


erichkeane wrote:

I think the `-fdelayed-template-parsing` is as much as we're going to do.  This is a conformance issue, and I don't think we want to create a backwards compatibility flag for it.

Clang has ALWAYS diagnosed un-instantiatable templates as aggressively as we could.  ALL of the examples above are functions that can never be used, even in other compilers.  SO I think diagnosing them aggressively/early is both acceptable, and of benefit to the programmers.

In all 3 cases, I'd suggest fixing it in some way:
1- Change the call to what the author of the code REALLY meant
2- Delete the function containing the issue entirely, since it clearly isn't being instantiated.

https://github.com/llvm/llvm-project/pull/90152


More information about the cfe-commits mailing list