[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 21 00:48:45 PDT 2026
================
@@ -7399,17 +7480,50 @@ TemplateName ASTContext::getCanonicalTemplateName(TemplateName Name,
// Keep popping from the back any deault arguments which are the same.
if (I == int(CanonArgs.size() - 1))
CanonArgs.pop_back();
- NonCanonical = true;
+ AnyChanged = true;
+ }
+ return AnyChanged ? getDeducedTemplateName(
----------------
ojhunt wrote:
I think this would be easier to read as
```cpp
if (!AnyChanged)
return Name;
return getDeducedTemplateName(.....);
```
https://github.com/llvm/llvm-project/pull/190495
More information about the cfe-commits
mailing list