diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/StmtCXX.h | 4 | ||||
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 2 |
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(); |