[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-06-22 Thread Erich Keane via cfe-commits

https://github.com/erichkeane commented:

So this patch is obviously massive.  However, it SEEMS that much of it is just 
renaming/fallout from the actual structural changes?  Can we have  a patch for 
separate review (doesnt' have to build/be separately mergable) that identifies 
WHAT the actual changes of consequence here are? I don't think I can agree to 
merge this without a better understanding here, which I can't do with a 
near-100 file diff.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-26 Thread Matheus Izvekov via cfe-commits




mizvekov wrote:

Yes, the type alias with unused template parameter changes mangling, but that's 
completely irrelevant to the test.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-26 Thread Yanzuo Liu via cfe-commits




zwuis wrote:

Just to confirm: are the changes in this file intended?

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-26 Thread Yanzuo Liu via cfe-commits


@@ -2255,34 +2255,101 @@ void CXXNameMangler::manglePrefix(const DeclContext 
*DC, bool NoFunction) {
   addSubstitution(ND);
 }
 
-void CXXNameMangler::mangleTemplatePrefix(TemplateName Template) {
+bool CXXNameMangler::mangleTemplatePrefix(TemplateName Template,

zwuis wrote:

Could you please document the return value?

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-25 Thread Matheus Izvekov via cfe-commits


@@ -7075,15 +7073,15 @@ QualType 
TreeTransform::TransformDecltypeType(TypeLocBuilder &TLB,
 return QualType();
 
   QualType Result = TL.getType();
-  if (getDerived().AlwaysRebuild() ||
-  E.get() != T->getUnderlyingExpr()) {
+  if (getDerived().AlwaysRebuild() || E.get() != TL.getUnderlyingExpr()) {
 Result = getDerived().RebuildDecltypeType(E.get(), TL.getDecltypeLoc());
 if (Result.isNull())
   return QualType();
-  }
-  else E.get();
+  } else
+E.get();

mizvekov wrote:

Bets me why that's in there, that just auto-formatted. It can't be doing 
anything.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-25 Thread Matheus Izvekov via cfe-commits

mizvekov wrote:

> Perhaps we should update the documentation in 'TypeBase.h' and 
> 'InternalsManual.rst' to state that the canonical type stored in 
> `ExtQualsTypeCommonBase` is the structural canonical type.

Perhaps. Though it would be a huge effort to update the terminology everywhere, 
and I'd expect we would still refer to structural canonical types as simply 
'canonical types' unless where we want to specifically contrast it to 
functional canonical types.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-25 Thread Matheus Izvekov via cfe-commits

mizvekov wrote:

ping

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-25 Thread Corentin Jabot via cfe-commits


@@ -1412,13 +1412,18 @@ TemplateArgumentLoc 
Sema::getTemplateArgumentPackExpansionPattern(
   }
 
   case TemplateArgument::Expression: {
-PackExpansionExpr *Expansion
-  = cast(Argument.getAsExpr());
+CanonicalizationKindOrNone CanonKind = std::nullopt;
+Expr *OrigE = OrigLoc.getSourceExpression(), *E = OrigE;
+if (!E) { // FIXME: Does this ever happen?
+  E = Argument.getAsExpr();
+  CanonKind = Argument.getExprCanonKind();
+}

cor3ntin wrote:

Maybe put an assert? It beats having dead code

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-25 Thread Yanzuo Liu via cfe-commits

zwuis wrote:

Perhaps we should update the documentation in 'TypeBase.h' and 
'InternalsManual.rst' to state that the canonical type stored in 
`ExtQualsTypeCommonBase` is the structural canonical type.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-25 Thread Corentin Jabot via cfe-commits


@@ -7075,15 +7073,15 @@ QualType 
TreeTransform::TransformDecltypeType(TypeLocBuilder &TLB,
 return QualType();
 
   QualType Result = TL.getType();
-  if (getDerived().AlwaysRebuild() ||
-  E.get() != T->getUnderlyingExpr()) {
+  if (getDerived().AlwaysRebuild() || E.get() != TL.getUnderlyingExpr()) {
 Result = getDerived().RebuildDecltypeType(E.get(), TL.getDecltypeLoc());
 if (Result.isNull())
   return QualType();
-  }
-  else E.get();
+  } else
+E.get();

cor3ntin wrote:

What is this supposed to do?

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-11 Thread via cfe-commits


@@ -6,11 +6,31 @@
 // RUN: %clang_cc1 -std=c++23 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
 // RUN: %clang_cc1 -std=c++2c -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
 
-
+#if __cplusplus < 201103L
 // expected-no-diagnostics
+#endif
 
 namespace cwg3106 { // cwg3106: 2.7
 #if __cplusplus >= 201103L
 const char str[9] = R"(\u{1234})";
 #endif
 } // namespace cwg3106
+
+namespace cwg3179 { // cwg3179: 23 tentatively ready 2026-04-30
+#if __cplusplus >= 201103L
+  template using void_t = void;
+  template struct S {
+void f(void_t);
+// expected-error@-1 {{'void' as parameter must not involve template 
parameters}}
+
+using X = int(void_t);
+// expected-error@-1 {{'void' as parameter must not involve template 
parameters}}
+  };
+  template void g(decltype((void)(T*)0));
+  // expected-error@-1 {{'void' as parameter must not involve template 
parameters}}
+#endif
+#if __cplusplus >= 202002L
+  template bool v = requires(void_t) { true; };
+  // expected-error@-1 {{'void' as parameter must not involve template 
parameters}}
+#endif
+} // namespace cwg3159

h-vetinari wrote:

```suggestion
} // namespace cwg3179
```

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-09 Thread Corentin Jabot via cfe-commits

cor3ntin wrote:

@hubert-reinterpretcast I understand you have opinion on CWG 3179?

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-06 Thread Matheus Izvekov via cfe-commits

mizvekov wrote:

@erichkeane I have split the most trivial changes into a separate commit.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-06 Thread Erich Keane via cfe-commits

https://github.com/erichkeane commented:

Honestly, this is just too huge to review reasonably.  I'm not sure what we can 
do about this.  We need to figure out a way to split up the meaningful/useful 
changes from 'the rest' so that we can properly grok what is going on.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-06 Thread Erich Keane via cfe-commits

erichkeane wrote:

This is sizable enough that I haven't had the time to dedicate to it yet, so 
I'd still like a chance to make time to review this.  I'll do a 'quick' pass 
right now, but need to spend some time on it, due to its size.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-04 Thread Oliver Hunt via cfe-commits

https://github.com/ojhunt approved this pull request.

LGTM :D

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-04 Thread Oliver Hunt via cfe-commits

ojhunt wrote:

I suspect not, but I'll go through again now

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-05-04 Thread Matheus Izvekov via cfe-commits

mizvekov wrote:

ping, this has been sitting for two weeks.

Any objections we merge this and continue on post-commit?

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Matheus Izvekov via cfe-commits


@@ -167,8 +167,7 @@ class TemplateArgument {
 unsigned Kind : 31;
 LLVM_PREFERRED_TYPE(bool)
 unsigned IsDefaulted : 1;
-LLVM_PREFERRED_TYPE(bool)
-unsigned IsCanonicalExpr : 1;
+unsigned ExprCanonKind : 2;

mizvekov wrote:

I have just added the PREFERRED_TYPE annotations in any case, they at least 
don't seem to hurt anything, and improve readability a bit I guess.

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -6691,34 +6745,35 @@ QualType ASTContext::getReferenceQualifiedType(const 
Expr *E) const {
 /// nodes. This would never be helpful, since each such type has its own
 /// expression, and would not give a significant memory saving, since there
 /// is an Expr tree under each such type.
-QualType ASTContext::getDecltypeType(Expr *E, QualType UnderlyingType) const {
-  // C++11 [temp.type]p2:
-  //   If an expression e involves a template parameter, decltype(e) denotes a
-  //   unique dependent type. Two such decltype-specifiers refer to the same
-  //   type only if their expressions are equivalent (14.5.6.1).
-  QualType CanonType;
-  if (!E->isInstantiationDependent()) {
-CanonType = getCanonicalType(UnderlyingType);
-  } else if (!UnderlyingType.isNull()) {
-CanonType = getDecltypeType(E, QualType());
-  } else {
-llvm::FoldingSetNodeID ID;
-DependentDecltypeType::Profile(ID, *this, E);
+QualType ASTContext::getDecltypeType(Expr *E,
+ CanonicalizationKindOrNone ExprCanonKind,
+ QualType UnderlyingType) const {
+  llvm::FoldingSetNodeID ID;
+  DecltypeType::Profile(ID, *this, E, ExprCanonKind, UnderlyingType);
 
-void *InsertPos = nullptr;
-if (DependentDecltypeType *Canon =
-DependentDecltypeTypes.FindNodeOrInsertPos(ID, InsertPos))
-  return QualType(Canon, 0);
+  void *InsertPos = nullptr;
+  if (auto *T = DecltypeTypes.FindNodeOrInsertPos(ID, InsertPos))
+return QualType(T, 0);
 
-// Build a new, canonical decltype(expr) type.
-auto *DT =
-new (*this, alignof(DependentDecltypeType)) DependentDecltypeType(E);
-DependentDecltypeTypes.InsertNode(DT, InsertPos);
-Types.push_back(DT);
-return QualType(DT, 0);
+  // C++26 [temp.type]p4: If an expression e is type-dependent, decltype(e)
+  // denotes a unique dependent type. Two such decltype-specifiers refer to the
+  // same type only if their expressions are equivalent ([temp.over.link]).
+  QualType CanonType;
+  if (!E->isTypeDependent()) {

ojhunt wrote:

nit: no braces

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -572,7 +568,7 @@ void TemplateArgument::print(const PrintingPolicy &Policy, 
raw_ostream &Out,
 
   case Expression: {
 PrintingPolicy ExprPolicy = Policy;
-ExprPolicy.PrintAsCanonical = isCanonicalExpr();
+ExprPolicy.PrintAsCanonical = bool(getExprCanonKind());

ojhunt wrote:

I think this should be an explicit comparison not a direct bool cast

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -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
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -230,7 +230,7 @@ template 
 static bool containsExpr(ASTContext *Context, const ContainerT *Container,
  const Expr *E) {
   llvm::FoldingSetNodeID ID;
-  E->Profile(ID, *Context, true);
+  E->Profile(ID, *Context, CanonicalizationKind::Structural);

ojhunt wrote:

yay, removing bool parameters will always make me happy

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -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(
+CanonUnderlying,
+/*DefaultArgs=*/{DefArgs.StartPos, CanonArgs})
+  : Name;
+  }
+  case TemplateName::QualifiedTemplate: {
+auto *S = Name.getAsQualifiedTemplateName();
+TemplateName Underlying = S->getUnderlyingTemplate();
+if (CanonKind == CanonicalizationKind::Structural) {

ojhunt wrote:

nit: no braces

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -2135,6 +2136,15 @@ class alignas(TypeAlignment) Type : public 
ExtQualsTypeCommonBase {
 unsigned AttrKind : 32 - NumTypeBits;
   };
 
+  class DecltypeTypeBitfields {
+friend class DecltypeType;
+
+LLVM_PREFERRED_TYPE(TypeBitfields)
+unsigned : NumTypeBits;
+
+unsigned ExprCanonKind : 2;

ojhunt wrote:

preferred type please :) (I'll shut up now if there's more of this)

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -167,8 +167,7 @@ class TemplateArgument {
 unsigned Kind : 31;
 LLVM_PREFERRED_TYPE(bool)
 unsigned IsDefaulted : 1;
-LLVM_PREFERRED_TYPE(bool)
-unsigned IsCanonicalExpr : 1;
+unsigned ExprCanonKind : 2;

ojhunt wrote:

please add `LLVM_PREFERRED_TYPE(CanonicalizationKind)`, both for debugging and 
diagnostics (I made our bitfield enum diagnostics reason about preferred type 
if it's an enum :)

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -2966,8 +2991,27 @@ class ASTContext : public RefCountedBase {
 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
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -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(
+CanonUnderlying,
+/*DefaultArgs=*/{DefArgs.StartPos, CanonArgs})
+  : Name;
+  }
+  case TemplateName::QualifiedTemplate: {
+auto *S = Name.getAsQualifiedTemplateName();
+TemplateName Underlying = S->getUnderlyingTemplate();
+if (CanonKind == CanonicalizationKind::Structural) {
+  return getCanonicalTemplateName(S->getUnderlyingTemplate(), 
IgnoreDeduced,
+  CanonKind, AnyNonCanonical);
+}
+// The qualifier needs to be attached to whatever entity it belongs to.
+// Don't simply canonicalize the Underlying template, as that can turn a
+// UsingShadowDecl into it's target, forming a nonsensical qualified name.
+switch (Underlying.getKind()) {
+case TemplateName::Template:
+  Underlying = TemplateName(cast(
+  Underlying.getAsTemplateDecl()->getCanonicalDecl()));
+  break;
+case TemplateName::UsingTemplate:
+  Underlying = TemplateName(cast(
+  Underlying.getAsUsingShadowDecl()->getCanonicalDecl()));
+  break;
+default:
+  llvm_unreachable(
+  "unexpected underlying template name kind for qualified template");
 }

ojhunt wrote:

is it worth making this a function on TemplateName? getUnderlyingCanonicalDecl 
(or getCanonicalUnderlyingDecl)?

It seems like something that _could_ be a general useful operation - though 
obviously some code is too eager about dropping sugared types, etc - and the 
subtlety around things like using decls seems sufficient to warrant a central 
function.

Though obviously that would depend on this being something we _do_ think people 
might reasonably want to do in other contexts 

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits


@@ -1991,11 +2003,14 @@ class ASTContext : public RefCountedBase {
   ElaboratedTypeKeyword Keyword, TemplateName T,
   ArrayRef CanonicalArgs) const;
 
+  /// \param Unique Whether to perform uniquing for this type. Generally
+  /// avoided, unless necessary for correctness, because it's very expensive.

ojhunt wrote:

I feel that a separate `getUniquedTemplateSpecializationType(...)` method might 
be a better approach - it makes the function semantics clearer (at least to 
me), but I think it really boils down to whether it would make sense for 
someone to ask for a uniqued specialization without spelling out the underlying 
type. e.g. this interface explicitly requires a correct underlying type, or 
`QualType()`, before specifying the uniquing behavior.

As a reader/reviewer it's also easier to see whether a given call is uniquing 
or not

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits

https://github.com/ojhunt edited 
https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-21 Thread Oliver Hunt via cfe-commits

https://github.com/ojhunt commented:

No substantive comments - mostly nits and some questions around function layout

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-20 Thread Matheus Izvekov via cfe-commits

mizvekov wrote:

ping

https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [lldb] [clang] implement CWG1980 and CWG2064: instantiation-dependency improvements (PR #190495)

2026-04-16 Thread Matheus Izvekov via cfe-commits

https://github.com/mizvekov edited 
https://github.com/llvm/llvm-project/pull/190495
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits