aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-07-24 03:38:27 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-07-24 03:38:27 +0000
commit6d8f56f4799042c897831318326d8be55a879cb8 (patch)
treed8c11f9bfbfe1ff62475284a28b164df77b88c87
parent8c4859ad8a60388f09d641b88f9444ccc6c2f31b (diff)
Constify methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76939 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Index/Entity.h2
-rw-r--r--lib/Index/Entity.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Index/Entity.h b/include/clang/Index/Entity.h
index cd87e4ccc1..2b5adc6882 100644
--- a/include/clang/Index/Entity.h
+++ b/include/clang/Index/Entity.h
@@ -55,7 +55,7 @@ public:
Entity() { }
/// \brief Find the Decl that can be referred to by this entity.
- Decl *getDecl(ASTContext &AST);
+ Decl *getDecl(ASTContext &AST) const;
/// \brief Get a printable name for debugging purpose.
std::string getPrintableName() const;
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index 25061e6150..85b4f2e196 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -145,7 +145,7 @@ std::string EntityImpl::getPrintableName() {
Entity::Entity(Decl *D) : Val(D->getCanonicalDecl()) { }
/// \brief Find the Decl that can be referred to by this entity.
-Decl *Entity::getDecl(ASTContext &AST) {
+Decl *Entity::getDecl(ASTContext &AST) const {
if (isInvalid())
return 0;