39 if (
Diag.ImmediateDiag)
41 else if (
Diag.PartialDiagId)
49 ImmediateDiag->AddFixItHint(Hint);
50 else if (PartialDiagId)
51 S.DeviceDeferredDiags[Fn][*PartialDiagId].second.AddFixItHint(Hint);
54llvm::DenseMap<CanonicalDeclPtr<const FunctionDecl>,
55 std::vector<PartialDiagnosticAt>> &
56SemaBase::SemaDiagnosticBuilder::getDeviceDeferredDiags()
const {
57 return S.DeviceDeferredDiags;
67 auto SetIsLastErrorImmediate = [&](
bool Flag) {
72 SetIsLastErrorImmediate(
true);
This file declares semantic analysis for CUDA constructs.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
PartialDiagnostic::DiagStorageAllocator & getDiagAllocator()
void Clear() const
Clear out the current diagnostic.
bool isActive() const
Determine whether this diagnostic is still active.
static bool isDeferrable(unsigned DiagID)
Whether the diagnostic message can be deferred.
Concrete class used by the front-end to report problems and issues.
const IntrusiveRefCntPtr< DiagnosticIDs > & getDiagnosticIDs() const
Annotates a diagnostic with some code that should be inserted, removed, or replaced to fix the proble...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
unsigned getDiagID() const
void Emit(const DiagnosticBuilder &DB) const
A generic diagnostic builder for errors which may or may not be deferred.
@ K_Immediate
Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
void AddFixItHint(const FixItHint &Hint) const
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
Emit a diagnostic.
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
ASTContext & getASTContext() const
const LangOptions & getLangOpts() const
DiagnosticsEngine & getDiagnostics() const
SemaDiagnosticBuilder DiagIfHostCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
SemaDiagnosticBuilder DiagIfDeviceCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Sema - This implements semantic analysis and AST building for C.
bool IsLastErrorImmediate
Is the last error level diagnostic immediate.
FunctionDecl * getCurFunctionDecl(bool AllowLambda=false) const
Returns a pointer to the innermost enclosing function, or nullptr if the current context is not insid...
SemaDiagnosticBuilder::DeferredDiagnosticsType DeviceDeferredDiags
Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
void EmitCurrentDiagnostic(unsigned DiagID)
Cause the active diagnostic on the DiagosticsEngine to be emitted.
const LangOptions & LangOpts
bool DeferDiags
Whether deferrable diagnostics should be deferred.
DiagnosticsEngine & Diags
Encodes a location in the source.
The JSON file list parser is used to communicate input to InstallAPI.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.