-
Notifications
You must be signed in to change notification settings - Fork 13k
Remove presubmit check for DISALLOW_* macros #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eglaysher
merged 1 commit into
google:gh-pages
from
backes:remove-disallow-presubmit-check
Jul 26, 2017
Merged
Remove presubmit check for DISALLOW_* macros #265
eglaysher
merged 1 commit into
google:gh-pages
from
backes:remove-disallow-presubmit-check
Jul 26, 2017
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before C++11, we were using a hack to disable copy constructors or copy assignment by declaring the methods private and not implementing them. This hack required the respective macros to be placed in the private: declarations of a class. The macros have switched to use the C++11 "= delete" syntax some time ago in both v8 and chromium: https://codereview.chromium.org/1123723003/ https://codereview.chromium.org/2017213002 Also the comments are now updated, since the macros do not need to be in the private: declarations any more: https://chromium-review.googlesource.com/c/577687 https://chromium-review.googlesource.com/c/578027 This change also removes the presubmit check that checked that the macros are only used in the private declarations.
|
Looks like the unit tests need to to be updated to reflect this change. $ python2 cpplint_unittest.py
.......................................................................................................F....................................................................
======================================================================
FAIL: testMisplacedDisallowMacros (__main__.CpplintTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "cpplint_unittest.py", line 1987, in testMisplacedDisallowMacros
' [readability/constructors] [3]')
File "cpplint_unittest.py", line 220, in TestMultiLineLint
self.assertEquals(expected_message, self.PerformMultiLineLint(code))
AssertionError: 'DISALLOW_COPY_AND_ASSIGN must be in the private: section [readability/constructors] [3]' != ''
----------------------------------------------------------------------
Ran 172 tests in 0.547s
FAILED (failures=1) |
Contributor
|
I went and fixed up the tests in 6c8669e. |
Contributor
Author
|
Thanks for fixing the tests, Elliot! |
robin-raymond
pushed a commit
to webrtc-uwp/depot_tools
that referenced
this pull request
Aug 25, 2017
Before C++11, we were using a hack to disable copy constructors or copy assignment by declaring the methods private and not implementing them. This hack required the respective macros to be placed in the private: declarations of a class. The macros have switched to use the C++11 "= delete" syntax some time ago in both v8 and chromium: https://codereview.chromium.org/1123723003/ https://codereview.chromium.org/2017213002 Also the comments are now updated, since the macros do not need to be in the private: declarations any more: https://chromium-review.googlesource.com/c/577687 https://chromium-review.googlesource.com/c/578027 This change removes the presubmit check that checked that the macros are only used in the private declarations. This is a cherry-pick from google/styleguide#265. R=jochen@chromium.org Change-Id: I224005a17c3de2569b64622e6cf8c9688665637d Reviewed-on: https://chromium-review.googlesource.com/579187 Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
zasgar
referenced
this pull request
in pixie-io/cpplint
Sep 2, 2021
…it-check Remove presubmit check for DISALLOW_* macros
abeir
pushed a commit
to abeir/depot_tools
that referenced
this pull request
Apr 24, 2024
Patch Set 1: > Patch Set 1: > > no, it's https://github.com/google/styleguide/tree/gh-pages/cpplint (also, please don't post links to internal sites..) I created a pull request: google/styleguide#265 Once this lands, what's the procedure? Update the CL description and also land this one? Patch-set: 1 Reviewer: Gerrit User 1177599 <1177599@3ce6091f-6c88-37e8-8c75-72f92ae8dfba>
abeir
pushed a commit
to abeir/depot_tools
that referenced
this pull request
Apr 24, 2024
Patch Set 1: > Patch Set 1: > > > Patch Set 1: > > > > no, it's https://github.com/google/styleguide/tree/gh-pages/cpplint (also, please don't post links to internal sites..) > > I created a pull request: > google/styleguide#265 > > Once this lands, what's the procedure? Update the CL description and also land this one? I wonder what the diff to the upstream version looks like. If we can't easily just copy the upstream version, we should file a bug and land this CL Patch-set: 1 Reviewer: Gerrit User 1176519 <1176519@3ce6091f-6c88-37e8-8c75-72f92ae8dfba>
abeir
pushed a commit
to abeir/depot_tools
that referenced
this pull request
Apr 24, 2024
Patch Set 2: > Patch Set 1: > > > Patch Set 1: > > > > > Patch Set 1: > > > > > > no, it's https://github.com/google/styleguide/tree/gh-pages/cpplint (also, please don't post links to internal sites..) > > > > I created a pull request: > > google/styleguide#265 > > > > Once this lands, what's the procedure? Update the CL description and also land this one? > > I wonder what the diff to the upstream version looks like. If we can't easily just copy the upstream version, we should file a bug and land this CL The diff to upstream is >100 lines. Mostly about the 'project_root' and 'headers' options. Anyway, I updated the description of this CL to link to the github pull request, and would propose to just land this now. It definitely reduces the diff :) Patch-set: 2 Reviewer: Gerrit User 1177599 <1177599@3ce6091f-6c88-37e8-8c75-72f92ae8dfba>
abeir
pushed a commit
to abeir/depot_tools
that referenced
this pull request
Apr 24, 2024
Before C++11, we were using a hack to disable copy constructors or copy assignment by declaring the methods private and not implementing them. This hack required the respective macros to be placed in the private: declarations of a class. The macros have switched to use the C++11 "= delete" syntax some time ago in both v8 and chromium: https://codereview.chromium.org/1123723003/ https://codereview.chromium.org/2017213002 Also the comments are now updated, since the macros do not need to be in the private: declarations any more: https://chromium-review.googlesource.com/c/577687 https://chromium-review.googlesource.com/c/578027 This change removes the presubmit check that checked that the macros are only used in the private declarations. This is a cherry-pick from google/styleguide#265. R=jochen@chromium.org Change-Id: I224005a17c3de2569b64622e6cf8c9688665637d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before C++11, we were using a hack to disable copy constructors or copy
assignment by declaring the methods private and not implementing them.
This hack required the respective macros to be placed in the private:
declarations of a class.
The macros have switched to use the C++11 "= delete" syntax some time
ago in both v8 and chromium:
https://codereview.chromium.org/1123723003/
https://codereview.chromium.org/2017213002
Also the comments are now updated, since the macros do not need to be
in the private: declarations any more:
https://chromium-review.googlesource.com/c/577687
https://chromium-review.googlesource.com/c/578027
This change also removes the presubmit check that checked that the
macros are only used in the private declarations.