RESOLVED FIXED Bug 124731
check-webkit-style is wrong about expected format parameter pack rvalue reference arguments
https://bugs.webkit.org/show_bug.cgi?id=124731
Summary check-webkit-style is wrong about expected format parameter pack rvalue refer...
Brady Eidson
Reported 2013-11-21 11:45:52 PST
check-webkit-style is wrong about expected format parameter pack rvalue reference arguments Noticed in a patch attached to https://bugs.webkit.org/show_bug.cgi?id=124698 The complaints were: Source/WebKit2/Shared/AsyncRequest.h:44: Missing spaces around && [whitespace/operators] [3] Source/WebKit2/Shared/AsyncRequest.h:70: Missing spaces around && [whitespace/operators] [3] Source/WebKit2/Shared/AsyncRequest.h:91: Missing spaces around && [whitespace/operators] [3] The lines in question are: template<typename... Arguments> void requestCompleted(Arguments&&... arguments); void requestCompleted(Arguments&&... arguments) template<typename... Arguments> void AsyncRequest::requestCompleted(Arguments&&... arguments) The script must be detecting && as the 'boolean and' operator. The formatting in this patch is actually correct/preferred.
Attachments
Patch (1.70 KB, patch)
2013-11-22 02:36 PST, László Langó
no flags
Patch (2.48 KB, patch)
2013-11-22 02:44 PST, László Langó
no flags
Patch (2.30 KB, patch)
2013-11-29 00:00 PST, László Langó
no flags
Zan Dobersek
Comment 1 2013-11-21 12:58:09 PST
Bug #123406 likely covers the same issue.
Brady Eidson
Comment 2 2013-11-21 13:28:31 PST
(In reply to comment #1) > Bug #123406 likely covers the same issue. Hmmmm I guess it's not out on the bot yet?
Csaba Osztrogonác
Comment 3 2013-11-21 13:36:43 PST
László fixed an rvalue related bug in bug123406. It seems the style checker needs a little bit more fine tuning.
Csaba Osztrogonác
Comment 4 2013-11-21 13:38:26 PST
(In reply to comment #1) > Bug #123406 likely covers the same issue Unortunately no, I tried the mentioned patch after the fix for bug123406 landed, but style checker still fails on it.
László Langó
Comment 5 2013-11-21 23:13:42 PST
(In reply to comment #4) > (In reply to comment #1) > > Bug #123406 likely covers the same issue > > Unortunately no, I tried the mentioned patch after the fix > for bug123406 landed, but style checker still fails on it. Yes, that was another bug, but i can check this too, if nobody works on it.
László Langó
Comment 6 2013-11-22 02:36:35 PST
László Langó
Comment 7 2013-11-22 02:44:54 PST
László Langó
Comment 8 2013-11-22 02:45:52 PST
I fixed this. It passed on the code you mentioned and passed on all webkitpy test, but maybe this isn't the best regexp. I don't know that is there any other tricky way to use c++11 rvaule reference.
Peter Gal
Comment 9 2013-11-28 08:13:47 PST
Comment on attachment 217663 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=217663&action=review > Tools/Scripts/webkitpy/style/checkers/cpp.py:1848 > if matched: > - error(line_number, 'whitespace/operators', 3, > - 'Missing spaces around %s' % matched.group(1)) > + # It is necessary to check this because rvaule references > + # parameter packs (c++11 feature) > + if not search(r'&&\.\.\.', line): These two ifs could be merged together.
László Langó
Comment 10 2013-11-28 23:14:25 PST
(In reply to comment #9) > (From update of attachment 217663 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=217663&action=review > > > Tools/Scripts/webkitpy/style/checkers/cpp.py:1848 > > if matched: > > - error(line_number, 'whitespace/operators', 3, > > - 'Missing spaces around %s' % matched.group(1)) > > + # It is necessary to check this because rvaule references > > + # parameter packs (c++11 feature) > > + if not search(r'&&\.\.\.', line): > > These two ifs could be merged together. You are right, we could simplify this.
László Langó
Comment 11 2013-11-29 00:00:37 PST
Peter Gal
Comment 12 2013-12-02 01:58:16 PST
Comment on attachment 218037 [details] Patch cool, this looks better now :)
Zoltan Herczeg
Comment 13 2013-12-04 02:49:53 PST
Comment on attachment 218037 [details] Patch r=me
WebKit Commit Bot
Comment 14 2013-12-04 03:17:56 PST
Comment on attachment 218037 [details] Patch Clearing flags on attachment: 218037 Committed r160086: <http://trac.webkit.org/changeset/160086>
WebKit Commit Bot
Comment 15 2013-12-04 03:18:00 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 16 2013-12-04 11:54:29 PST
Comment on attachment 218037 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218037&action=review > Tools/Scripts/webkitpy/style/checkers/cpp.py:1845 > + # It is necessary to check this, because rvaule references can be in Typo here: rvaule.
Note You need to log in before you can comment on or make changes to this bug.