diff --git a/include/cling/Interpreter/RuntimeExceptions.h b/include/cling/Interpreter/RuntimeExceptions.h index ed0fcb2a..ccd4d867 100644 --- a/include/cling/Interpreter/RuntimeExceptions.h +++ b/include/cling/Interpreter/RuntimeExceptions.h @@ -14,13 +14,13 @@ namespace cling { ///\brief Exception that is thrown when a null pointer dereference is found /// or a method taking non-null arguments is called with NULL argument. /// - class cling_null_deref_exception { + class NullDerefException { private: unsigned m_Location; clang::Sema* m_Sema; public: - cling_null_deref_exception(void* Loc, clang::Sema* S); - ~cling_null_deref_exception(); + NullDerefException(void* Loc, clang::Sema* S); + ~NullDerefException(); void what() throw(); diff --git a/lib/Interpreter/ASTNullDerefProtection.cpp b/lib/Interpreter/ASTNullDerefProtection.cpp index 73709251..d05521ba 100644 --- a/lib/Interpreter/ASTNullDerefProtection.cpp +++ b/lib/Interpreter/ASTNullDerefProtection.cpp @@ -88,9 +88,9 @@ namespace cling { NamespaceDecl* clingRuntimeNSD = utils::Lookup::Namespace(m_Sema, "runtime", NSD); - // Find and set up "cling_null_deref_exception" + // Find and set up "NullDerefException" DeclarationName Name - = &Context->Idents.get("cling_null_deref_exception"); + = &Context->Idents.get("NullDerefException"); LookupResult R(*m_Sema, Name, SourceLocation(), Sema::LookupOrdinaryName, Sema::ForRedeclaration); diff --git a/lib/Interpreter/RuntimeExceptions.cpp b/lib/Interpreter/RuntimeExceptions.cpp index 550a86bc..54c27fc0 100644 --- a/lib/Interpreter/RuntimeExceptions.cpp +++ b/lib/Interpreter/RuntimeExceptions.cpp @@ -13,15 +13,15 @@ namespace cling { namespace runtime { - cling_null_deref_exception::cling_null_deref_exception( - void* Loc, clang::Sema* S) : m_Location(*(unsigned *)Loc), m_Sema(S){} + NullDerefException::NullDerefException(void* Loc, clang::Sema* S) + : m_Location(*(unsigned *)Loc), m_Sema(S) {} - cling_null_deref_exception::~cling_null_deref_exception() {} + NullDerefException::~NullDerefException() {} - void cling_null_deref_exception::what() throw() { - clang::DiagnosticsEngine& Diag = m_Sema->getDiagnostics(); - Diag.Report(clang::SourceLocation::getFromRawEncoding(m_Location), - clang::diag::warn_null_arg); + void NullDerefException::what() throw() { + clang::DiagnosticsEngine& Diag = m_Sema->getDiagnostics(); + Diag.Report(clang::SourceLocation::getFromRawEncoding(m_Location), + clang::diag::warn_null_arg); } } // end namespace runtime } // end namespace cling diff --git a/lib/UserInterface/UserInterface.cpp b/lib/UserInterface/UserInterface.cpp index 67f8a41a..403e8641 100644 --- a/lib/UserInterface/UserInterface.cpp +++ b/lib/UserInterface/UserInterface.cpp @@ -90,7 +90,7 @@ namespace cling { TI.SetPrompt(Prompt.c_str()); } - catch(runtime::cling_null_deref_exception e) { + catch(runtime::NullDerefException& e) { // The diagnostic goes here: e.what(); }