Fix decl / impl noexcept mismatch; throw() -> noexcept.

This commit is contained in:
Axel Naumann 2016-04-12 11:54:45 +02:00 committed by sftnight
parent c3480a086c
commit 739a3c962c
2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ namespace cling {
public:
virtual ~InterpreterException() noexcept;
virtual const char* what() const throw();
virtual const char* what() const noexcept;
virtual void diagnose() const {}
};
@ -44,7 +44,7 @@ namespace cling {
InvalidDerefException(clang::Sema* S, clang::Expr* E, DerefType type);
virtual ~InvalidDerefException();
const char* what() const throw() override;
const char* what() const noexcept override;
void diagnose() const override;
};
} // end namespace cling

View File

@ -37,15 +37,15 @@ void* cling_runtime_internal_throwIfInvalidPointer(void* Sema, void* Expr,
namespace cling {
// Pin vtable
InterpreterException::~InterpreterException() {}
InterpreterException::~InterpreterException() noexcept {}
const char* InterpreterException::what() const throw() {
const char* InterpreterException::what() const noexcept {
return "runtime_exception\n";
}
InvalidDerefException::~InvalidDerefException() {}
const char* InvalidDerefException::what() const throw() {
const char* InvalidDerefException::what() const noexcept {
// Invalid memory access.
if (m_Type == cling::InvalidDerefException::DerefType::INVALID_MEM)
return "Trying to access a pointer that points to an invalid memory address.";