Add warning for non-c-typedef-for-linkage

This is blocking Skia from updating to newer clang

Tbr=cwallez@chromium.org
Bug: chromium:1064305
Change-Id: I7d894dba701ebe2fe0e1b78d5fb42032d88846aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22522
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
Austin Eng 2020-06-02 18:54:20 +00:00 committed by Commit Bot service account
parent 5b3cdc66fd
commit 3fb9c1bbfb
2 changed files with 5 additions and 4 deletions

View File

@ -104,6 +104,7 @@ config("dawn_internal") {
"-Wshadow-field", "-Wshadow-field",
"-Wstrict-prototypes", "-Wstrict-prototypes",
"-Wtautological-unsigned-zero-compare", "-Wtautological-unsigned-zero-compare",
"-Wnon-c-typedef-for-linkage",
] ]
if (is_win) { if (is_win) {

View File

@ -59,18 +59,18 @@ typedef struct {
} DawnSwapChainImplementation; } DawnSwapChainImplementation;
#if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus) #if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus)
typedef struct { struct DawnWSIContextD3D12 {
WGPUDevice device = nullptr; WGPUDevice device = nullptr;
} DawnWSIContextD3D12; };
#endif #endif
#if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__) #if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__)
# import <Metal/Metal.h> # import <Metal/Metal.h>
typedef struct { struct DawnWSIContextMetal {
id<MTLDevice> device = nil; id<MTLDevice> device = nil;
id<MTLCommandQueue> queue = nil; id<MTLCommandQueue> queue = nil;
} DawnWSIContextMetal; };
#endif #endif
#ifdef DAWN_ENABLE_BACKEND_OPENGL #ifdef DAWN_ENABLE_BACKEND_OPENGL