|
|
Descriptioncompiler_specific.h: define FINAL as final when using Clang on Windows
Clang on Windows sneakily identifies itself as both Clang and MSVC :)
Previously, we would end up defining FINAL as "sealed" here, but in Blink,
we'd define it as "final", causing lots of warnings. This change means
we define it the same in both places.
BUG=82385
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248499
Patch Set 1 #
Messages
Total messages: 29 (0 generated)
Please take a look.
Sealed is msvs 08, right? Can you try just using final for msvs too and see what the bots say? On Jan 31, 2014 10:55 AM, <hans@chromium.org> wrote: > Reviewers: Nico, > > Message: > Please take a look. > > Description: > compiler_specific.h: define FINAL as final when using Clang on Windows > > Clang on Windows sneakily identifies itself as both Clang and MSVC :) > Previously, we would end up defining FINAL as "sealed" here, but in Blink, > we'd define it as "final", causing lots of warnings. This change means > we define it the same in both places. > > BUG=82385 > > Please review this at https://codereview.chromium.org/134243005/ > > SVN Base: https://chromium.googlesource.com/chromium/src.git@master > > Affected files (+3, -3 lines): > M base/compiler_specific.h > > > Index: base/compiler_specific.h > diff --git a/base/compiler_specific.h b/base/compiler_specific.h > index 09b4e7033269c7e9279c37b9c267a5560e7ca06c.. > fa9983143172855fab2b718f31bfdda77168f8a4 100644 > --- a/base/compiler_specific.h > +++ b/base/compiler_specific.h > @@ -154,11 +154,11 @@ > // Use like: > // virtual void foo() FINAL; > // class B FINAL : public A {}; > -#if defined(COMPILER_MSVC) > +#if defined(__clang__) > +#define FINAL final > +#elif defined(COMPILER_MSVC) > // TODO(jered): Change this to "final" when chromium no longer uses MSVC > 2010. > #define FINAL sealed > -#elif defined(__clang__) > -#define FINAL final > #elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \ > (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 > // GCC 4.7 supports explicit virtual overrides when C++11 support is > enabled. > > > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2014/01/31 19:08:27, Nico wrote: > Sealed is msvs 08, right? Can you try just using final for msvs too and see > what the bots say? Seems to be msvs 2010 as the comment says. When I try it locally, I get "error C3646: 'final' : unknown override specifier". I don't remember what our lowest supported version is supposed to be, though?
lgtm
The CQ bit was checked by hans@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hans@chromium.org/134243005/1
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on linux_clang for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_clan...
CQ bit was unchecked on CL. Ignoring.
CQ bit was unchecked on CL. Ignoring.
The CQ bit was checked by hans@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hans@chromium.org/134243005/1
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_cl...
CQ bit was unchecked on CL. Ignoring.
CQ bit was unchecked on CL. Ignoring.
The CQ bit was checked by hans@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hans@chromium.org/134243005/1
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on linux_chromeos_clang for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chro...
CQ bit was unchecked on CL. Ignoring.
CQ bit was unchecked on CL. Ignoring.
The CQ bit was checked by hans@chromium.org
The CQ bit was unchecked by hans@chromium.org
The CQ bit was checked by hans@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hans@chromium.org/134243005/1
Message was sent while issue was closed.
CQ bit was unchecked on CL. Ignoring.
Message was sent while issue was closed.
Change committed as 248499
Message was sent while issue was closed.
CQ bit was unchecked on CL. Ignoring. |