Chromium Code Reviews| Index: base/compiler_specific.h |
| diff --git a/base/compiler_specific.h b/base/compiler_specific.h |
| index 0a6e05a6c67988b64b416b612d47ec41c457a78f..c61641219455c72db67c605feb9e8c2638727ea8 100644 |
| --- a/base/compiler_specific.h |
| +++ b/base/compiler_specific.h |
| @@ -137,4 +137,15 @@ |
| // If available, it would look like: |
| // __attribute__((format(wprintf, format_param, dots_param))) |
| +// Annotate a class to indicate that it cannot be subclassed. Use this very |
| +// sparingly. The only valid use case is if you have a class with virtual |
| +// methods but no virtual destructor -- see http://crbug.com/84424 |
| +// Use like: |
| +// class B FINAL : public A {}; |
| +#if defined(__clang__) |
|
Mark Mentovai
2011/05/31 14:41:05
Should we have COMPILER_CLANG?
|
| +#define FINAL final |
|
Mark Mentovai
2011/05/31 14:41:05
I’m surprised it’s final and not __final__ or an _
|
| +#else |
| +#define FINAL |
| +#endif |
| + |
| #endif // BASE_COMPILER_SPECIFIC_H_ |