From 06d8c60e37cd8cfdff1bf73ec8d58c2373cfd8f1 Mon Sep 17 00:00:00 2001
From: Dmitri Gribenko <gribozavr@gmail.com>
Date: Fri, 11 Jan 2013 20:32:41 +0000
Subject: [PATCH] Constify parameter of clang::getCursorKindForDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172249 91177308-0d34-0410-b5e6-96231b3b80d8
---
 include/clang/Sema/CodeCompleteConsumer.h | 2 +-
 lib/Sema/SemaCodeComplete.cpp             | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index e5bc711811..2eb9170369 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -138,7 +138,7 @@ unsigned getMacroUsagePriority(StringRef MacroName,
 
 /// \brief Determine the libclang cursor kind associated with the given
 /// declaration.
-CXCursorKind getCursorKindForDecl(Decl *D);
+CXCursorKind getCursorKindForDecl(const Decl *D);
 
 class FunctionDecl;
 class FunctionType;
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index a23fdb140a..8d7a340952 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -2828,7 +2828,7 @@ unsigned clang::getMacroUsagePriority(StringRef MacroName,
   return Priority;
 }
 
-CXCursorKind clang::getCursorKindForDecl(Decl *D) {
+CXCursorKind clang::getCursorKindForDecl(const Decl *D) {
   if (!D)
     return CXCursor_UnexposedDecl;
   
@@ -2888,7 +2888,7 @@ CXCursorKind clang::getCursorKindForDecl(Decl *D) {
         return CXCursor_ModuleImportDecl;
       
     default:
-      if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
+      if (const TagDecl *TD = dyn_cast<TagDecl>(D)) {
         switch (TD->getTagKind()) {
           case TTK_Interface:  // fall through
           case TTK_Struct: return CXCursor_StructDecl;
-- 
2.40.0