win: Avoid 'warning C4068: unknown pragma'

I could also add COMPILER_CLANG to build_config.h, but that doesn't
appear in Chromium, apparently in preference to using __clang__
directly. I'm not sure if there's any good reason for that.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/803283002
This commit is contained in:
Scott Graham 2014-12-15 16:01:16 -08:00
parent c23dcdc88a
commit e8ab9afd82

View File

@ -48,15 +48,21 @@ struct CrashpadInfo {
// shouldnt warn about that. These fields arent intended for use by the
// process theyre found in, theyre supposed to be read by the crash
// reporting process.
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
// Fields present in version 1:
uint32_t signature_; // kSignature
uint32_t size_; // The size of the entire CrashpadInfo structure.
uint32_t version_; // kVersion
uint32_t padding_0_;
SimpleStringDictionary* simple_annotations_; // weak
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
DISALLOW_COPY_AND_ASSIGN(CrashpadInfo);
};