aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/ASTLocation.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:39:35 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:39:35 +0000
commit6dbbc0e20a648cb2a9d520f5a7a394a6c07d6c68 (patch)
tree3806e8e0df2caca7065826e9871bd63363e552b1 /lib/Index/ASTLocation.cpp
parent614455cdacdea77cc8ea89efca08f043f65877d7 (diff)
Constify ASTLocation::print.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/ASTLocation.cpp')
-rw-r--r--lib/Index/ASTLocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Index/ASTLocation.cpp b/lib/Index/ASTLocation.cpp
index 55a90fad8d..d528c5ac5f 100644
--- a/lib/Index/ASTLocation.cpp
+++ b/lib/Index/ASTLocation.cpp
@@ -117,14 +117,14 @@ SourceRange ASTLocation::getSourceRange() const {
return isDecl() ? getDecl()->getSourceRange() : getStmt()->getSourceRange();
}
-void ASTLocation::print(llvm::raw_ostream &OS) {
+void ASTLocation::print(llvm::raw_ostream &OS) const {
if (isInvalid()) {
OS << "<< Invalid ASTLocation >>\n";
return;
}
OS << "[Decl: " << getDecl()->getDeclKindName() << " ";
- if (NamedDecl *ND = dyn_cast<NamedDecl>(getDecl()))
+ if (const NamedDecl *ND = dyn_cast<NamedDecl>(getDecl()))
OS << ND->getNameAsString();
if (getStmt()) {