[clang] [Clang] support friend declarations with a dependent nested-name-specifier (PR #191268)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 09:27:58 PDT 2026
================
@@ -2524,19 +2523,12 @@ class FriendTemplateDecl : public Decl {
return Friend.dyn_cast<NamedDecl*>();
}
- /// Retrieves the location of the 'friend' keyword.
- SourceLocation getFriendLoc() const {
- return FriendLoc;
+ TemplateParameterList *getFriendTypeTemplateParameterList(unsigned N) const {
+ assert(N < NumTPLists);
+ return getTrailingObjects()[N];
}
- TemplateParameterList *getTemplateParameterList(unsigned i) const {
- assert(i <= NumParams);
- return Params[i];
- }
-
- unsigned getNumTemplateParameters() const {
- return NumParams;
- }
+ unsigned getFriendTypeNumTemplateParameterLists() const { return NumTPLists; }
----------------
mizvekov wrote:
Since you are changing this already, make a single method that returns an ArrayRef instead?
https://github.com/llvm/llvm-project/pull/191268
More information about the cfe-commits
mailing list