OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_COMPILER_SPECIFIC_H_ | 5 #ifndef BASE_COMPILER_SPECIFIC_H_ |
6 #define BASE_COMPILER_SPECIFIC_H_ | 6 #define BASE_COMPILER_SPECIFIC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 #define PRINTF_FORMAT(format_param, dots_param) | 130 #define PRINTF_FORMAT(format_param, dots_param) |
131 #endif | 131 #endif |
132 | 132 |
133 // WPRINTF_FORMAT is the same, but for wide format strings. | 133 // WPRINTF_FORMAT is the same, but for wide format strings. |
134 // This doesn't appear to yet be implemented in any compiler. | 134 // This doesn't appear to yet be implemented in any compiler. |
135 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308 . | 135 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308 . |
136 #define WPRINTF_FORMAT(format_param, dots_param) | 136 #define WPRINTF_FORMAT(format_param, dots_param) |
137 // If available, it would look like: | 137 // If available, it would look like: |
138 // __attribute__((format(wprintf, format_param, dots_param))) | 138 // __attribute__((format(wprintf, format_param, dots_param))) |
139 | 139 |
140 // Annotate a class to indicate that it cannot be subclassed. Use this very | |
141 // sparingly. The only valid use case is if you have a class with virtual | |
142 // methods but no virtual destructor -- see http://crbug.com/84424 | |
143 // Use like: | |
144 // class B FINAL : public A {}; | |
145 #if defined(__clang__) | |
Mark Mentovai
2011/05/31 14:41:05
Should we have COMPILER_CLANG?
| |
146 #define FINAL final | |
Mark Mentovai
2011/05/31 14:41:05
I’m surprised it’s final and not __final__ or an _
| |
147 #else | |
148 #define FINAL | |
149 #endif | |
150 | |
140 #endif // BASE_COMPILER_SPECIFIC_H_ | 151 #endif // BASE_COMPILER_SPECIFIC_H_ |
OLD | NEW |