Constify methods.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 24 Jul 2009 03:38:27 +0000 (03:38 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 24 Jul 2009 03:38:27 +0000 (03:38 +0000)
llvm-svn: 76939

clang/include/clang/Index/Entity.h
clang/lib/Index/Entity.cpp

index cd87e4ccc16ea7becffb9db5943a66e03c43a5cf..2b5adc6882d01dcd46a54a8c744bcc16112ce216 100644 (file)
@@ -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;
index 25061e61501289ded8c4145d503356b5bfa73103..85b4f2e1961767d1e5f85f7e435f01f3213022b4 100644 (file)
@@ -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;