Skip to content

Commit 58a97f1

Browse files
committed
Runtime: Suppress a -Winvalid-offsetof warning.
1 parent 4727327 commit 58a97f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/public/runtime/Metadata.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,13 +439,16 @@ namespace {
439439
} // end anonymous namespace
440440

441441
namespace swift {
442+
#pragma clang diagnostic push
443+
#pragma clang diagnostic ignored "-Winvalid-offsetof"
442444
struct StaticAssertGenericMetadataCacheEntryValueOffset {
443445
static_assert(
444446
offsetof(GenericCacheEntry, Value) ==
445447
offsetof(swift::GenericMetadataCacheEntry<InProcess::StoredPointer>,
446448
Value),
447449
"The generic metadata cache entry layout mismatch");
448450
};
451+
#pragma clang diagnostic pop
449452
}
450453

451454
namespace {

0 commit comments

Comments
 (0)