Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: base/compiler_specific.h

Issue 1531873004: base: remove dcheng's TODO for updating webrtc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(COMPILER_MSVC) 10 #if defined(COMPILER_MSVC)
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #if defined(COMPILER_MSVC) 116 #if defined(COMPILER_MSVC)
117 #define ALIGNOF(type) __alignof(type) 117 #define ALIGNOF(type) __alignof(type)
118 #elif defined(COMPILER_GCC) 118 #elif defined(COMPILER_GCC)
119 #define ALIGNOF(type) __alignof__(type) 119 #define ALIGNOF(type) __alignof__(type)
120 #endif 120 #endif
121 121
122 // Annotate a function indicating the caller must examine the return value. 122 // Annotate a function indicating the caller must examine the return value.
123 // Use like: 123 // Use like:
124 // int foo() WARN_UNUSED_RESULT; 124 // int foo() WARN_UNUSED_RESULT;
125 // To explicitly ignore a result, see |ignore_result()| in base/macros.h. 125 // To explicitly ignore a result, see |ignore_result()| in base/macros.h.
126 // TODO(dcheng): Update //third_party/webrtc's macro definition to match.
127 #undef WARN_UNUSED_RESULT 126 #undef WARN_UNUSED_RESULT
128 #if defined(COMPILER_GCC) || defined(__clang__) 127 #if defined(COMPILER_GCC) || defined(__clang__)
129 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) 128 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
130 #else 129 #else
131 #define WARN_UNUSED_RESULT 130 #define WARN_UNUSED_RESULT
132 #endif 131 #endif
133 132
134 // Tell the compiler a function is using a printf-style format string. 133 // Tell the compiler a function is using a printf-style format string.
135 // |format_param| is the one-based index of the format string parameter; 134 // |format_param| is the one-based index of the format string parameter;
136 // |dots_param| is the one-based index of the "..." parameter. 135 // |dots_param| is the one-based index of the "..." parameter.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // Macro for hinting that an expression is likely to be false. 181 // Macro for hinting that an expression is likely to be false.
183 #if !defined(UNLIKELY) 182 #if !defined(UNLIKELY)
184 #if defined(COMPILER_GCC) 183 #if defined(COMPILER_GCC)
185 #define UNLIKELY(x) __builtin_expect(!!(x), 0) 184 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
186 #else 185 #else
187 #define UNLIKELY(x) (x) 186 #define UNLIKELY(x) (x)
188 #endif // defined(COMPILER_GCC) 187 #endif // defined(COMPILER_GCC)
189 #endif // !defined(UNLIKELY) 188 #endif // !defined(UNLIKELY)
190 189
191 #endif // BASE_COMPILER_SPECIFIC_H_ 190 #endif // BASE_COMPILER_SPECIFIC_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698