forked from OSchip/llvm-project
Constify parameter of clang::getCursorKindForDecl
llvm-svn: 172249
This commit is contained in:
parent
fb3c009b52
commit
bdc80de74c
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue