]> granicus.if.org Git - clang/commitdiff
Constify parameter of clang::getCursorKindForDecl
authorDmitri Gribenko <gribozavr@gmail.com>
Fri, 11 Jan 2013 20:32:41 +0000 (20:32 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Fri, 11 Jan 2013 20:32:41 +0000 (20:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172249 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/CodeCompleteConsumer.h
lib/Sema/SemaCodeComplete.cpp

index e5bc711811766a8f985e1474c3c4072dd2a9e1ec..2eb9170369c8f0430483e895f27cfd2bca165ce0 100644 (file)
@@ -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;
index a23fdb140ac377d88da7c542a50a0877d9d15050..8d7a3409526e0f8a88a9b703a557f0264b36e4d3 100644 (file)
@@ -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;