================
@@ -590,28 +590,28 @@ class CollectExtraHighlightings
bool
VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D) {
- if (auto *Args = D->getTemplateArgsAsWritten())
- H.addAngleBracketTokens(Args->getLAngleLoc(), Args->getRAngleLoc());
- return true;
- }
-
- bool VisitClassTemplatePartialSpecializationDecl(
- ClassTemplatePartialSpecializationDecl *D) {
- if (auto *TPL = D->getTemplateParameters())
- H.addAngleBracketTokens(TPL->getLAngleLoc(), TPL->getRAngleLoc());
+ if (const auto *Info = D->getExplicitInstantiationInfo()) {
+ H.addAngleBracketTokens(Info->TemplateArgsAsWritten->getLAngleLoc(),
----------------
mizvekov wrote:
That could be confusing, for example, it would be reasonable to expect, by the
name alone, that such a function would include the source locations of the
arguments themselves, ie the range of all source locations between the `<`and
`>` inclusive.
https://github.com/llvm/llvm-project/pull/199528
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits