[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed May 28 06:59:07 PDT 2025


================
@@ -522,6 +522,12 @@ enum class TemplateSubstitutionKind : char {
     llvm::PointerUnion<Decl *, DeclArgumentPack *> *
     findInstantiationOf(const Decl *D);
 
+    /// Similar to \p findInstantiationOf(), but it wouldn't assert if the
+    /// instantiation was not found within the current instantiation scope. This
+    /// is helpful for on-demand declaration instantiation.
+    llvm::PointerUnion<Decl *, DeclArgumentPack *> *
+    findInstantiationUnsafe(const Decl *D);
----------------
erichkeane wrote:

Yep, I'm ok cleaning that interface up in a follow up.  Was just curious because it is very much a 'smell'.

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


More information about the cfe-commits mailing list