We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60e0120 commit 3b417b7Copy full SHA for 3b417b7
clang/lib/AST/Comment.cpp
@@ -379,11 +379,11 @@ StringRef TParamCommandComment::getParamName(const FullComment *FC) const {
379
assert(isPositionValid());
380
const TemplateParameterList *TPL = FC->getDeclInfo()->TemplateParameters;
381
for (unsigned i = 0, e = getDepth(); i != e; ++i) {
382
- if (i == e-1)
+ assert(TPL && "Unknown TemplateParameterList");
383
+ if (i == e - 1)
384
return TPL->getParam(getIndex(i))->getName();
385
const NamedDecl *Param = TPL->getParam(getIndex(i));
- if (const TemplateTemplateParmDecl *TTP =
386
- dyn_cast<TemplateTemplateParmDecl>(Param))
+ if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(Param))
387
TPL = TTP->getTemplateParameters();
388
}
389
return "";
0 commit comments