CppInterOp
C++ Language Interoperability Layer
Loading...
Searching...
No Matches
Namespaces | Functions
ErrorInternal.cpp File Reference
#include "CppInterOp/Error.h"
#include "CppInterOp/CppInterOpTypes.h"
#include "Compatibility.h"
#include "ErrorInternal.h"
#include "InterpreterInfo.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <utility>
Include dependency graph for ErrorInternal.cpp:

Go to the source code of this file.

Namespaces

namespace  Cpp
 

Functions

static const StoredDiagViewCpp::AsView (DiagnosticRef D)
 
DiagnosticSeverity Cpp::GetDiagnosticSeverity (DiagnosticRef D)
 
const char * Cpp::GetDiagnosticMessage (DiagnosticRef D)
 
const char * Cpp::GetDiagnosticFile (DiagnosticRef D)
 
unsigned Cpp::GetDiagnosticLine (DiagnosticRef D)
 
unsigned Cpp::GetDiagnosticColumn (DiagnosticRef D)
 
Status Cpp::GetStatus (ErrorRef E)
 
ArrayView< DiagnosticRef > Cpp::GetDiagnostics (ErrorRef E)
 
void Cpp::RetainErrorRef (ErrorRef E)
 
void Cpp::ReleaseErrorRef (ErrorRef E)
 
ErrorSliceCpp::AllocSlice (InterpreterInfo *Owner)
 Allocate a fresh slice on the heap, refcount 0.
 
ErrorRef Cpp::makeError (Status S)
 Build an inline-status ErrorRef (no diagnostics, no payload).
 
ErrorRef Cpp::makeError (InterpreterInfo *II, Status S, std::string Message, const char *Producer, const char *ProducerSig)
 Build a slice-encoded error carrying a Clang-derived message + the interp's pending diagnostics + producer attribution.
 
ErrorRef Cpp::drainError (InterpreterInfo *II, llvm::Error E, const char *Producer, const char *ProducerSig)
 Drain E into a fresh slice, returning the slice via ErrorRef.
 
void Cpp::InstallDiagConsumer (InterpreterInfo *II)
 Wire CppInterOp's DiagnosticConsumer into the interpreter's DiagnosticsEngine so parser/sema diagnostics flow into II->StoredDiags and continue forwarding to whatever consumer Clang already had.
 
void Cpp::DrainPendingInto (InterpreterInfo *II, ErrorSlice *S)
 Drain the consumer's per-interp buffer into a slice on failure.
 
void Cpp::ClearPending (InterpreterInfo *II)
 
unsigned Cpp::GetPendingDiagnosticCount (InterpRef I)
 
DiagnosticRef Cpp::GetPendingDiagnostic (unsigned Idx, InterpRef I)
 
void Cpp::ClearPendingDiagnostics (InterpRef I)
 
void Cpp::ResultAbort_ValueOnError (const ErrorRef &)
 
void Cpp::ResultAbort_UncheckedOnDtor (const ErrorRef &)