blob: 8bf1f0db2e32c5fcb37cfb899e9aebaeed616df1 [file] [log] [blame]
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/src/cmd/gen to generate diagnostic_control.h
See:
* tools/src/cmd/gen for structures used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------
*/ -}}
{{- $I := LoadIntrinsics "src/tint/lang/core/core.def" -}}
{{- Import "src/tint/utils/templates/enums.tmpl.inc" -}}
#ifndef SRC_TINT_LANG_CORE_DIAGNOSTIC_RULE_H_
#define SRC_TINT_LANG_CORE_DIAGNOSTIC_RULE_H_
#include <cstdint>
#include <string>
#include <variant>
#include "src/tint/utils/traits/traits.h"
namespace tint::core {
/// WGSL core diagnostic rules.
{{ Eval "DeclareEnum" ($I.Sem.Enum "core_diagnostic_rule") }}
/// Chromium-specific diagnostic rules.
{{ Eval "DeclareEnum" ($I.Sem.Enum "chromium_diagnostic_rule") }}
/// All diagnostic rules understood by Tint.
using DiagnosticRule = std::variant<CoreDiagnosticRule, ChromiumDiagnosticRule>;
} // namespace tint::core
#endif // SRC_TINT_LANG_CORE_DIAGNOSTIC_RULE_H_