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

Issue 153953009: Revert of Update the static_cast style check to check for DEFINE_TYPE_CASTS patterns as well. (Closed)

Created:
6 years, 10 months ago by r.kasibhatla
Modified:
6 years, 10 months ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Revert of Update the static_cast style check to check for DEFINE_TYPE_CASTS patterns as well. (https://codereview.chromium.org/145033013/) Reason for revert: The patch will be breaking the style check on the patch since the regex compiled _RE_GENERAL_MACRO_PATTERN_STRING & _RE_GENERAL_MACRO_PATTERN_STRING are not correct. The regex (mentioned above) needs to be set properly. Will be uploading new patch with correct regex. Original issue's description: > Update the static_cast style check to check for DEFINE_TYPE_CASTS patterns as well. > > Existing implementation of check-webkit-style warns the user if he uses static_cast<> > in the code. This is behind runtime/casting filter which needs to be enabled specifically. > > As part of 309516, all the toFoo() definitions have been replaced with DEFINE_*_TYPE_CASTS > macro, which defines the toFoo functions at compile time. This patch updates the check to > include even the macro pattern to identify whether existing toFoo exists or user needs to > define the toFoo convienience function (through macro). > > Since all existing usage of static_cast<Foo*> has been replaced with toFoo() calls, > now we are throwing an error if user uses static_cast<> inspite of presence of toFoo(). > If toFoo doesn't exist, we still retain a warning behind runtime/casting filter. > > BUG=309516 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166491 TBR=dpranke@chromium.org,tkent@chromium.org,inferno@chromium.org,aarya@google.com,sigbjornf@opera.com NOTREECHECKS=true NOTRY=true BUG=309516 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166501

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -38 lines) Patch
M Tools/Scripts/webkitpy/style/checkers/cpp.py View 7 chunks +20 lines, -34 lines 0 comments Download
M Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py View 4 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
r.kasibhatla
Created Revert of Update the static_cast style check to check for DEFINE_TYPE_CASTS patterns as well.
6 years, 10 months ago (2014-02-05 13:53:03 UTC) #1
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-05 13:53:09 UTC) #2
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 10 months ago (2014-02-05 13:53:09 UTC) #3
RaviKasibhatla
The CQ bit was checked by kphanee@chromium.org
6 years, 10 months ago (2014-02-05 13:54:45 UTC) #4
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-05 13:55:04 UTC) #5
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 10 months ago (2014-02-05 13:55:04 UTC) #6
RaviKasibhatla
dpranke, inferno: Can either of you commit this revert. There was an issue with committed ...
6 years, 10 months ago (2014-02-05 14:11:38 UTC) #7
apavlov
lgtm
6 years, 10 months ago (2014-02-05 14:48:11 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/r.kasibhatla@samsung.com/153953009/1
6 years, 10 months ago (2014-02-05 14:48:36 UTC) #9
commit-bot: I haz the power
6 years, 10 months ago (2014-02-05 14:49:03 UTC) #10
Message was sent while issue was closed.
Change committed as 166501

Powered by Google App Engine
This is Rietveld 408576698