[cfe-commits] r172249 - in /cfe/trunk: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp

Dmitri Gribenko gribozavr at gmail.com
Fri Jan 11 12:32:42 PST 2013


Author: gribozavr
Date: Fri Jan 11 14:32:41 2013
New Revision: 172249

URL: http://llvm.org/viewvc/llvm-project?rev=172249&view=rev
Log:
Constify parameter of clang::getCursorKindForDecl

Modified:
    cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp

Modified: cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h?rev=172249&r1=172248&r2=172249&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h (original)
+++ cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h Fri Jan 11 14:32:41 2013
@@ -138,7 +138,7 @@
 
 /// \brief Determine the libclang cursor kind associated with the given
 /// declaration.
-CXCursorKind getCursorKindForDecl(Decl *D);
+CXCursorKind getCursorKindForDecl(const Decl *D);
 
 class FunctionDecl;
 class FunctionType;

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=172249&r1=172248&r2=172249&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Fri Jan 11 14:32:41 2013
@@ -2828,7 +2828,7 @@
   return Priority;
 }
 
-CXCursorKind clang::getCursorKindForDecl(Decl *D) {
+CXCursorKind clang::getCursorKindForDecl(const Decl *D) {
   if (!D)
     return CXCursor_UnexposedDecl;
   
@@ -2888,7 +2888,7 @@
         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;





More information about the cfe-commits mailing list