Skip to content

Commit 96637b4

Browse files
authored
[Clang] Improve getReplacedTemplateParameterList() const correctness (#131165)
1 parent 15a5b3a commit 96637b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/include/clang/AST/DeclTemplate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3392,7 +3392,7 @@ inline std::optional<unsigned> getExpandedPackSize(const NamedDecl *Param) {
33923392

33933393
/// Internal helper used by Subst* nodes to retrieve the parameter list
33943394
/// for their AssociatedDecl.
3395-
TemplateParameterList *getReplacedTemplateParameterList(Decl *D);
3395+
TemplateParameterList *getReplacedTemplateParameterList(const Decl *D);
33963396

33973397
} // namespace clang
33983398

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ void TemplateParamObjectDecl::printAsInit(llvm::raw_ostream &OS,
16421642
getValue().printPretty(OS, Policy, getType(), &getASTContext());
16431643
}
16441644

1645-
TemplateParameterList *clang::getReplacedTemplateParameterList(Decl *D) {
1645+
TemplateParameterList *clang::getReplacedTemplateParameterList(const Decl *D) {
16461646
switch (D->getKind()) {
16471647
case Decl::Kind::CXXRecord:
16481648
return cast<CXXRecordDecl>(D)

0 commit comments

Comments
 (0)