Chromium Code Reviews| Index: base/compiler_specific.h |
| diff --git a/base/compiler_specific.h b/base/compiler_specific.h |
| index bb4c52be45e298b31c73566f8b927445a7a952f4..a914782fe13cccb364e6b632cda45ac3bb1daab2 100644 |
| --- a/base/compiler_specific.h |
| +++ b/base/compiler_specific.h |
| @@ -157,6 +157,16 @@ |
| // If available, it would look like: |
| // __attribute__((format(wprintf, format_param, dots_param))) |
| +// Sanitizers annotations. |
| +#ifdef __has_attribute |
| +#if __has_attribute(no_sanitize) |
| +#define NO_SANITIZE(what) __attribute__((no_sanitize(what))) |
| +#endif |
| +#endif |
|
Mark Mentovai
2016/11/15 01:34:07
#ifdef #if #endif #endif #ifndef #endif
What a mo
Nico
2016/11/15 15:25:37
gcc doesn't like that; && early-terminates executi
etienneb
2016/11/15 15:45:01
Done.
|
| +#ifndef NO_SANITIZE |
|
Nico
2016/11/15 15:25:37
alos `if !defined` instead of `ifndef`
etienneb
2016/11/15 15:45:01
Done.
|
| +#define NO_SANITIZE(what) |
| +#endif |
| + |
| // MemorySanitizer annotations. |
| #if defined(MEMORY_SANITIZER) && !defined(OS_NACL) |
| #include <sanitizer/msan_interface.h> |