| Index: base/compiler_specific.h
|
| diff --git a/base/compiler_specific.h b/base/compiler_specific.h
|
| index 09b4e7033269c7e9279c37b9c267a5560e7ca06c..a527df755a37272ccc32c56e028ca37d6214148f 100644
|
| --- a/base/compiler_specific.h
|
| +++ b/base/compiler_specific.h
|
| @@ -149,6 +149,16 @@
|
| #define OVERRIDE
|
| #endif
|
|
|
| +// XXX amazing comment
|
| +#if defined(__clang__) && defined(__has_warning)
|
| +#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
|
| +#define FALLTHROUGH_INTENDED [[clang::fallthrough]] // NOLINT
|
| +#endif
|
| +#endif
|
| +
|
| +#ifndef FALLTHROUGH_INTENDED
|
| +#define FALLTHROUGH_INTENDED do { } while (0)
|
| +
|
| // Annotate a virtual method indicating that subclasses must not override it,
|
| // or annotate a class to indicate that it cannot be subclassed.
|
| // Use like:
|
| @@ -167,6 +177,18 @@
|
| #define FINAL
|
| #endif
|
|
|
| +// Annotate a virtual method indicating it must be overriding a virtual
|
| +// method in the parent class.
|
| +// Use like:
|
| +// virtual void foo() OVERRIDE;
|
| +#if defined(COMPILER_MSVC)
|
| +#define OVERRIDE override
|
| +#elif defined(__clang__)
|
| +#define OVERRIDE override
|
| +#else
|
| +#define OVERRIDE
|
| +#endif
|
| +
|
| // Annotate a function indicating the caller must examine the return value.
|
| // Use like:
|
| // int foo() WARN_UNUSED_RESULT;
|
| @@ -196,7 +218,6 @@
|
| // If available, it would look like:
|
| // __attribute__((format(wprintf, format_param, dots_param)))
|
|
|
| -
|
| // MemorySanitizer annotations.
|
| #ifdef MEMORY_SANITIZER
|
| extern "C" {
|
|
|