diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 08:12:00 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 08:12:00 +0000 |
commit | 7815a361a27eb90fa33ba42b92faeb5e991897f3 (patch) | |
tree | b10d186b900fb53e304d4e81b956968f48a150ae /base | |
parent | 6f8dc9f5327c1242dc0c7f87a45a59904faacce4 (diff) | |
download | chromium_src-7815a361a27eb90fa33ba42b92faeb5e991897f3.zip chromium_src-7815a361a27eb90fa33ba42b92faeb5e991897f3.tar.gz chromium_src-7815a361a27eb90fa33ba42b92faeb5e991897f3.tar.bz2 |
Update ALLOW_THIS_IN_INITIALIZER_LIST macro to reflect its deprecatation.
In addition move C4355 to list of sanctioned compiler warning suppressions.
The warning was disabled globally for ~2 years, meaning the macro wasn't providing any value. Refer to bug and chromium-dev@ discussion for details.
BUG=234765
Review URL: https://chromiumcodereview.appspot.com/14472011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/compiler_specific.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/base/compiler_specific.h b/base/compiler_specific.h index 01c1eb1..5291ee5 100644 --- a/base/compiler_specific.h +++ b/base/compiler_specific.h @@ -40,18 +40,15 @@ #define MSVC_DISABLE_OPTIMIZE() __pragma(optimize("", off)) #define MSVC_ENABLE_OPTIMIZE() __pragma(optimize("", on)) -// Allows |this| to be passed as an argument in constructor initializer lists. -// This uses push/pop instead of the seemingly simpler suppress feature to avoid -// having the warning be disabled for more than just |code|. +// DEPRECATED // -// Example usage: -// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {} -// -// Compiler warning C4355: 'this': used in base member initializer list: +// Prior to r83840 this was used to supress warning C4355 when using |this| as +// an argument in constructor initializer lists: // http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx -#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \ - code \ - MSVC_POP_WARNING() +// +// C4355 is supressed globally during compilation and existing uses of this +// macro should be removed. Refer to http://crbug.com/234765 for details. +#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code // Allows exporting a class that inherits from a non-exported base class. // This uses suppress instead of push/pop because the delimiter after the |