[cfe-commits] r90153 - in /cfe/trunk: include/clang/AST/StmtCXX.h lib/AST/Stmt.cpp
Mike Stump
mrs at apple.com
Mon Nov 30 12:10:58 PST 2009
Author: mrs
Date: Mon Nov 30 14:10:58 2009
New Revision: 90153
URL: http://llvm.org/viewvc/llvm-project?rev=90153&view=rev
Log:
Add const to accessors that don't modify the object.
Modified:
cfe/trunk/include/clang/AST/StmtCXX.h
cfe/trunk/lib/AST/Stmt.cpp
Modified: cfe/trunk/include/clang/AST/StmtCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtCXX.h?rev=90153&r1=90152&r2=90153&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtCXX.h (original)
+++ cfe/trunk/include/clang/AST/StmtCXX.h Mon Nov 30 14:10:58 2009
@@ -43,8 +43,8 @@
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;
Modified: cfe/trunk/lib/AST/Stmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Stmt.cpp?rev=90153&r1=90152&r2=90153&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Stmt.cpp (original)
+++ cfe/trunk/lib/AST/Stmt.cpp Mon Nov 30 14:10:58 2009
@@ -559,7 +559,7 @@
return &HandlerBlock + 1;
}
-QualType CXXCatchStmt::getCaughtType() {
+QualType CXXCatchStmt::getCaughtType() const {
if (ExceptionDecl)
return ExceptionDecl->getType();
return QualType();
More information about the cfe-commits
mailing list