[clang] [clang][NFC] Accept const NamedDecl pointer for getDepthAndIndex (PR #113857)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 27 20:24:37 PDT 2024
https://github.com/antangelo created https://github.com/llvm/llvm-project/pull/113857
None
>From 9ba109b5e3eae0fc42939ead72991fc17dcd3d0a Mon Sep 17 00:00:00 2001
From: antangelo <contact at antangelo.com>
Date: Sun, 27 Oct 2024 22:41:24 -0400
Subject: [PATCH] [clang][NFC] Accept const NamedDecl pointer for
getDepthAndIndex
---
clang/include/clang/Sema/SemaInternal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/include/clang/Sema/SemaInternal.h b/clang/include/clang/Sema/SemaInternal.h
index d994d1819b4423..41d05b2bfb078e 100644
--- a/clang/include/clang/Sema/SemaInternal.h
+++ b/clang/include/clang/Sema/SemaInternal.h
@@ -58,7 +58,7 @@ inline InheritableAttr *getDLLAttr(Decl *D) {
}
/// Retrieve the depth and index of a template parameter.
-inline std::pair<unsigned, unsigned> getDepthAndIndex(NamedDecl *ND) {
+inline std::pair<unsigned, unsigned> getDepthAndIndex(const NamedDecl *ND) {
if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(ND))
return std::make_pair(TTP->getDepth(), TTP->getIndex());
More information about the cfe-commits
mailing list