summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-11-30 20:10:58 +0000
committerMike Stump <mrs@apple.com>2009-11-30 20:10:58 +0000
commit21d68e24351ef5a2d95e6dd5676a9926dd2bf3a8 (patch)
treee73414ee60cfc438fda9f274c9eff86caf4bac9f
parente5311b0d79856cbba24076e3048a9c17ec93e6d9 (diff)
downloadbcm5719-llvm-21d68e24351ef5a2d95e6dd5676a9926dd2bf3a8.tar.gz
bcm5719-llvm-21d68e24351ef5a2d95e6dd5676a9926dd2bf3a8.zip
Add const to accessors that don't modify the object.
llvm-svn: 90153
-rw-r--r--clang/include/clang/AST/StmtCXX.h4
-rw-r--r--clang/lib/AST/Stmt.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/AST/StmtCXX.h b/clang/include/clang/AST/StmtCXX.h
index 99cddd82fc8..64eea2429c5 100644
--- a/clang/include/clang/AST/StmtCXX.h
+++ b/clang/include/clang/AST/StmtCXX.h
@@ -43,8 +43,8 @@ public:
SourceLocation getCatchLoc() const { return CatchLoc; }
VarDecl *getExceptionDecl() const { return ExceptionDecl; }
- QualType getCaughtType();
- Stmt *getHandlerBlock() { return HandlerBlock; }
+ QualType getCaughtType() const;
+ Stmt *getHandlerBlock() const { return HandlerBlock; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXCatchStmtClass;
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index ff35251ae39..fad80ec0cf2 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -559,7 +559,7 @@ Stmt::child_iterator CXXCatchStmt::child_end() {
return &HandlerBlock + 1;
}
-QualType CXXCatchStmt::getCaughtType() {
+QualType CXXCatchStmt::getCaughtType() const {
if (ExceptionDecl)
return ExceptionDecl->getType();
return QualType();
OpenPOWER on IntegriCloud