30 SemaRef.EmitDiagnostic(DiagID, *
this);
40 if (
Diag.ImmediateDiag)
42 else if (
Diag.PartialDiagId)
43 Diag.S.DeviceDeferredDiags[
Diag.Fn][*
Diag.PartialDiagId].second = PD;
50 ImmediateDiag->AddFixItHint(Hint);
51 else if (PartialDiagId)
52 S.DeviceDeferredDiags[Fn][*PartialDiagId].second.AddFixItHint(Hint);
55llvm::DenseMap<CanonicalDeclPtr<const FunctionDecl>,
56 std::vector<PartialDiagnosticAt>> &
57SemaBase::SemaDiagnosticBuilder::getDeviceDeferredDiags()
const {
58 return S.DeviceDeferredDiags;
67 (DeferHint ||
SemaRef.DeferDiags || !IsError);
68 auto SetIsLastErrorImmediate = [&](
bool Flag) {
70 SemaRef.IsLastErrorImmediate = Flag;
73 SetIsLastErrorImmediate(
true);
79 ?
SemaRef.CUDA().DiagIfDeviceCode(Loc, DiagID)
80 :
SemaRef.CUDA().DiagIfHostCode(Loc, DiagID);
92 unsigned CompatDiagId,
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 ...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
void Clear() const
Clear out the current diagnostic.
bool isActive() const
Determine whether this diagnostic is still active.
static unsigned getCXXCompatDiagId(const LangOptions &LangOpts, unsigned CompatDiagId)
Get the appropriate diagnostic Id to use for issuing a compatibility diagnostic.
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 DiagCompat(SourceLocation Loc, unsigned CompatDiagId, bool DeferHint=false)
Emit a compatibility diagnostic.
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
DeclContext * getCurContext() const
Sema - This implements semantic analysis and AST building for C.
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.