Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions include/ifc/abstract-sgraph.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ namespace ifc {
// to functions returning that type.
};

// FIXME: Move to an MSVC-specific file. Index type of sequences of suppressed warnings.
enum class SuppressedWarningSequenceIndex : uint32_t {};

// FIXME: Move to an MSVC-specific file. Index type of a suppressed warning.
enum class SuppressedWarning : uint16_t {};

// FIXME: Move to an MSVC-specific file. Attributes of segments.
enum class SegmentTraits : uint32_t {};

Expand Down Expand Up @@ -2882,12 +2876,6 @@ namespace ifc {
uint32_t variadic : 1 {}; // True if this macro is variadic.
};

struct PragmaWarningRegion {
SourceLocation start_locus{};
SourceLocation end_locus{};
SuppressedWarning suppressed_warning{};
};

// Note: this class is not meant to be used to create objects -- it is just a traits class.
template<typename T, LiteralSort s>
struct constant_traits : Tag<s> {
Expand Down Expand Up @@ -3257,6 +3245,21 @@ namespace ifc {

static_assert(sizeof(MsvcFileHashData) == 36);

// The MSVC warning number.
enum class MsvcWarningNumber : uint16_t {};

// The state of the warning associated with this pragma.
enum class MsvcWarningState : uint8_t {};

struct MsvcPragmaWarningRegion {
SourceLocation start_locus{};
SourceLocation end_locus{};
MsvcWarningNumber warning_number{};
MsvcWarningState warning_state{};
};

static_assert(sizeof(MsvcPragmaWarningRegion) == 20);

struct MsvcUuid : AssociatedTrait<DeclIndex, StringIndex>, TraitTag<MsvcTraitSort::Uuid> {};
struct MsvcSegment : AssociatedTrait<DeclIndex, DeclIndex>, TraitTag<MsvcTraitSort::Segment> {};
struct MsvcSpecializationEncoding : AssociatedTrait<DeclIndex, TextOffset>,
Expand Down Expand Up @@ -3318,7 +3321,7 @@ namespace ifc {
PartitionSummaryData charts; // Sequence of unilevel charts.
PartitionSummaryData multi_charts; // Sequence of multi-level charts.
PartitionSummaryData heaps[count<HeapSort>]; // Set of various abstract reference sequences.
PartitionSummaryData suppressed_warnings; // Association map of suppressed warnings.
PartitionSummaryData pragma_warnings; // Association map of pragma warning info.
PartitionSummaryData macros[count<MacroSort>]; // Table of exported macros.
PartitionSummaryData pragma_directives[count<PragmaSort>]; // Table of pragma directives.
PartitionSummaryData attrs[count<AttrSort>]; // Table of all attributes.
Expand Down
4 changes: 2 additions & 2 deletions src/sgraph.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ namespace ifc {
//{ &TableOfContents::segments, ".msvc.trait.code-segment" },
//{ &TableOfContents::vendor_traits, ".msvc.trait.vendor-traits" },
// { &TableOfContents::uuids, ".msvc.trait.uuid" },
{&TableOfContents::suppressed_warnings, ".msvc.trait.suppressed-warnings"},
{&TableOfContents::pragma_warnings, ".msvc.trait.pragma-warnings"},
//{ &TableOfContents::specialization_encodings, ".msvc.trait.specialization-encodings" },
//{ &TableOfContents::named_function_parameters, ".msvc.trait.named-function-parameters" },
//{ &TableOfContents::template_template_parameter_hacks, ".msvc.trait.template-template-parameter-classes"
Expand Down Expand Up @@ -590,7 +590,7 @@ namespace ifc {
PartitionSummaryData& msvc_trait_lookup(TableOfContents& toc, std::string_view name)
{
// A couple of msvc traits are not AssociatedTraits and require special handling
if (has_prefix(name, ".msvc.trait.impl-pragmas") or has_prefix(name, ".msvc.trait.suppressed-warnings"))
if (has_prefix(name, ".msvc.trait.impl-pragmas") or has_prefix(name, ".msvc.trait.pragma-warnings"))
return uncategorized_partition_lookup(toc, name);

return entry_by_name<msvc_traitsort_table, &TableOfContents::msvc_traits>(toc, name);
Expand Down