[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 26 01:39:05 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);
----------------
cor3ntin wrote:
`findInstantiationUnsafe` (can return null) and `getInstantiationOf` (asserts) would probably be better names.
Move that declaration _before_ the existing one.
https://github.com/llvm/llvm-project/pull/122423
More information about the cfe-commits
mailing list