[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 29 18:59:06 PDT 2024
================
@@ -1056,16 +1052,20 @@ bool Sema::AreConstraintExpressionsEqual(const NamedDecl *Old,
bool Sema::FriendConstraintsDependOnEnclosingTemplate(const FunctionDecl *FD) {
assert(FD->getFriendObjectKind() && "Must be a friend!");
+ FunctionTemplateDecl *FTD = FD->getDescribedFunctionTemplate();
// The logic for non-templates is handled in ASTContext::isSameEntity, so we
// don't have to bother checking 'DependsOnEnclosingTemplate' for a
// non-function-template.
- assert(FD->getDescribedFunctionTemplate() &&
- "Non-function templates don't need to be checked");
+ assert(FTD && "Non-function templates don't need to be checked");
SmallVector<const Expr *, 3> ACs;
- FD->getDescribedFunctionTemplate()->getAssociatedConstraints(ACs);
+ FTD->getAssociatedConstraints(ACs);
+#if 0
----------------
zyn0217 wrote:
Debugging leftovers?
https://github.com/llvm/llvm-project/pull/106585
More information about the cfe-commits
mailing list