Use default cling style for naming classes.
This commit is contained in:
parent
eff9830b09
commit
683a11e9e9
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user