[clang] c876d71 - [clang][NFC] Accept const NamedDecl pointer for getDepthAndIndex (#113857)

via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 27 21:26:00 PDT 2024


Author: antangelo
Date: 2024-10-28T00:25:56-04:00
New Revision: c876d719ef5b10128eca6d8677068248b4831017

URL: https://github.com/llvm/llvm-project/commit/c876d719ef5b10128eca6d8677068248b4831017
DIFF: https://github.com/llvm/llvm-project/commit/c876d719ef5b10128eca6d8677068248b4831017.diff

LOG: [clang][NFC] Accept const NamedDecl pointer for getDepthAndIndex (#113857)

Added: 
    

Modified: 
    clang/include/clang/Sema/SemaInternal.h

Removed: 
    


################################################################################
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