[cfe-commits] r77532 - in /cfe/trunk: include/clang/Index/ASTLocation.h lib/Index/ASTLocation.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Wed Jul 29 16:39:35 PDT 2009
Author: akirtzidis
Date: Wed Jul 29 18:39:35 2009
New Revision: 77532
URL: http://llvm.org/viewvc/llvm-project?rev=77532&view=rev
Log:
Constify ASTLocation::print.
Modified:
cfe/trunk/include/clang/Index/ASTLocation.h
cfe/trunk/lib/Index/ASTLocation.cpp
Modified: cfe/trunk/include/clang/Index/ASTLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Index/ASTLocation.h?rev=77532&r1=77531&r2=77532&view=diff
==============================================================================
--- cfe/trunk/include/clang/Index/ASTLocation.h (original)
+++ cfe/trunk/include/clang/Index/ASTLocation.h Wed Jul 29 18:39:35 2009
@@ -81,7 +81,7 @@
return !(L == R);
}
- void print(llvm::raw_ostream &OS);
+ void print(llvm::raw_ostream &OS) const;
};
} // namespace idx
Modified: cfe/trunk/lib/Index/ASTLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ASTLocation.cpp?rev=77532&r1=77531&r2=77532&view=diff
==============================================================================
--- cfe/trunk/lib/Index/ASTLocation.cpp (original)
+++ cfe/trunk/lib/Index/ASTLocation.cpp Wed Jul 29 18:39:35 2009
@@ -117,14 +117,14 @@
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()) {
More information about the cfe-commits
mailing list