slang::SourceManager::LineDirectiveInfo struct

Stores information specified in a `pragma diagnostic directive, which alters the / currently active set of diagnostic mappings.

struct DiagnosticDirectiveInfo { / The name of the diagnostic being controlled. std::string_view name;

/ Offset in the source where the directive occurred. size_t offset;

/ The new severity the diagnostic should have. DiagnosticSeverity severity;

DiagnosticDirectiveInfo(std::string_view name, size_t offset, DiagnosticSeverity severity) noexcept : name(name), offset(offset), severity(severity) {} };

/ Visits each buffer that contains diagnostic directives and invokes the provided / callback with the first argument being the buffer and the second being an / iterable collection of DiagnosticDirectiveInfos. template<typename Func> void visitDiagnosticDirectives(Func&& func) const { std::shared_lock lock(mutex); for (auto& [buffer, directives] : diagDirectives) func(buffer, directives); }

/ Gets the diagnostic directives associated with the given buffer, if any. /

/ Clears all diagnostic directives registered with the sourcemanager. void clearDiagnosticDirectives();

/ Returns a list of buffers (files and macros) that have been created in the / source manager. std::vector<BufferID> getAllBuffers() const;

private: Stores information specified in a `line directive, which alters the