[clang] [clang][NFC] Accept const NamedDecl pointer for getDepthAndIndex (PR #113857)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 27 20:25:13 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: None (antangelo)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/113857.diff
1 Files Affected:
- (modified) clang/include/clang/Sema/SemaInternal.h (+1-1)
``````````diff
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());
``````````
</details>
https://github.com/llvm/llvm-project/pull/113857
More information about the cfe-commits
mailing list