[clang] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 29 09:57:25 PDT 2026
================
@@ -89,23 +89,20 @@ static bool SubstQualifier(Sema &SemaRef, const DeclT *OldDecl, DeclT *NewDecl,
NestedNameSpecifierLoc NewQualifierLoc =
SemaRef.SubstNestedNameSpecifierLoc(OldDecl->getQualifierLoc(),
TemplateArgs);
-
- if (!NewQualifierLoc)
- return true;
-
+ assert(NewQualifierLoc &&
+ "substitution for the declaration qualifiers should never fail");
----------------
mizvekov wrote:
Not in a declarative nested name specifier, that has extra restrictions on top of regular nested name specifiers.
With this patch, we enforce the declarative nested specifiers are well behaved, so it's not possible to perform void_t SFINAE tricks that only affect out-of-line definitions for example.
https://github.com/llvm/llvm-project/pull/190495
More information about the cfe-commits
mailing list