summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-01-11 20:32:41 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-01-11 20:32:41 +0000
commitbdc80de74c64f270bb5dcd140b5411cab8f64f92 (patch)
treea613fa53b05e11bea5fbb9892fba03f51418d060 /clang
parentfb3c009b522b8e7554bb795ade3ce03fbf0a7c7d (diff)
downloadbcm5719-llvm-bdc80de74c64f270bb5dcd140b5411cab8f64f92.tar.gz
bcm5719-llvm-bdc80de74c64f270bb5dcd140b5411cab8f64f92.zip
Constify parameter of clang::getCursorKindForDecl
llvm-svn: 172249
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Sema/CodeCompleteConsumer.h2
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Sema/CodeCompleteConsumer.h b/clang/include/clang/Sema/CodeCompleteConsumer.h
index e5bc7118117..2eb9170369c 100644
--- a/clang/include/clang/Sema/CodeCompleteConsumer.h
+++ b/clang/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/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index a23fdb140ac..8d7a3409526 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud