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",
"-Wstrict-prototypes",
"-Wtautological-unsigned-zero-compare",
"-Wnon-c-typedef-for-linkage",
]
if (is_win) {

View File

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