diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-08-31 11:13:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-08-31 11:13:38 +0200 |
commit | 72cfd4d024aa9deb68010824a804f252e37b8388 (patch) | |
tree | 29f487192b7b2d0abe406b732e3f48bcfc616fc5 /include/vbahelper/vbadocumentbase.hxx | |
parent | 20b11e8dc40a1d467dcc3dd0fa7bedde72a292bf (diff) |
loplugin:constparams: Also handle ObjCObjectPointerType
...in 0660a30d54eb6762302cf1afd43de01e137f6393 "Avoid loplugin:constparam when
param is subject of cast to non-const pointer"
But turns out this whole avoidance is ill-advised and should eventually be
reverted:
Aug 31 09:09:26 <sberg> noelgrandin, the way you originally handled CastExpr in
constparam's checkIfCanBeConst, your intent was if there's code like
static_cast<T*>(p) and param p is found it can be made const, one would also
need to change that cast to static_cast<T const *>(p) when fixing the loplugin
warning, right?
Aug 31 09:09:43 <noelgrandin> sberg, correct
Aug 31 09:10:10 <sberg> noelgrandin, I messed the up with
0660a30d54eb6762302cf1afd43de01e137f6393
Aug 31 09:10:12 <IZBot> core - Avoid loplugin:constparam when param is subject
of cast to non-const pointer -
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0660a30d54eb6762302cf1afd43de01e137f6393
Aug 31 09:10:24 <noelgrandin> sberg, I probably should have had a test for that
Aug 31 09:10:41 <noelgrandin> tests are better at expressing intent
Aug 31 09:10:56 <sberg> I ran across it in a function that needed to have the
param non-const for API reasons (callback fn), and it looked like the "obvious"
fix there, not needing to add the fn to the blacklist
Aug 31 09:11:26 <sberg> I'll eventually get that fixed again (but want to first
get the Mac and Windows builds to succeed)
Aug 31 09:11:44 <noelgrandin> fair enough
Change-Id: Idef0cfc417ec0597a26a29c8720e3e4051a68e00
Diffstat (limited to 'include/vbahelper/vbadocumentbase.hxx')
0 files changed, 0 insertions, 0 deletions