[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:43 PDT 2026


================
@@ -2966,8 +2991,27 @@ class ASTContext : public RefCountedBase<ASTContext> {
     return getCanonicalType(T1) == getCanonicalType(T2);
   }
 
+  QualType getCanonicalType(QualType QT, CanonicalizationKind Kind) const;
+  QualType getCanonicalType(QualType QT, CanonicalizationKind Kind,
+                            bool &AnyNonCanonical) const {
+    QualType R = getCanonicalType(QT, Kind);
+    AnyNonCanonical |= !R.isCanonical();
----------------
ojhunt wrote:

this is likely a dumb question, in what cases does `getCanonicalType(...)` return a non-canonical type?

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


More information about the cfe-commits mailing list