WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
192743
Use warning-ignoring macros more consistently and simply
https://bugs.webkit.org/show_bug.cgi?id=192743
Summary
Use warning-ignoring macros more consistently and simply
Darin Adler
Reported
2018-12-15 13:30:20 PST
Use warning-ignoring macros more consistently and simply
Attachments
Patch
(35.47 KB, patch)
2018-12-15 13:45 PST
,
Darin Adler
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2018-12-15 13:45:13 PST
Created
attachment 357405
[details]
Patch
Mark Lam
Comment 2
2018-12-15 16:04:17 PST
Comment on
attachment 357405
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=357405&action=review
r=me
> Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h:35 > + explicit WebAlternativeTextClient(WebView *);
Remove space between "WebView" and "*".
> Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h:54 > + WebView *m_webView;
Shouldn't this be "WebView* m_webView;"? Why move the placement of the space?
Darin Adler
Comment 3
2018-12-15 16:05:50 PST
Comment on
attachment 357405
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=357405&action=review
>> Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h:35 >> + explicit WebAlternativeTextClient(WebView *); > > Remove space between "WebView" and "*".
In this case, WebView is an Objective-C class name. Our coding style document says that we should format it this way.
>> Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.h:54 >> + WebView *m_webView; > > Shouldn't this be "WebView* m_webView;"? Why move the placement of the space?
Ditto.
Darin Adler
Comment 4
2018-12-15 16:16:29 PST
Hmm, strangely the WebKit coding style guidelines on the website no longer say this. The now say “in non-C++ code” instead of having the rule depend on the type of the pointed-to object. I like the new guideline better, but I don’t remember the WebKit project discussion about making this change.
Darin Adler
Comment 5
2018-12-15 16:21:00 PST
I’ll make the changes you suggested, Mark. Not important either way, and I choose to interpret the wording in the latest draft of the document as a new guideline.
Darin Adler
Comment 6
2018-12-15 16:21:31 PST
Committed
r239255
: <
https://trac.webkit.org/changeset/239255
>
Radar WebKit Bug Importer
Comment 7
2018-12-15 16:28:20 PST
<
rdar://problem/46757455
>
Alexey Proskuryakov
Comment 8
2018-12-17 14:00:15 PST
(In reply to Darin Adler from
comment #4
)
> Hmm, strangely the WebKit coding style guidelines on the website no longer > say this. The now say “in non-C++ code” instead of having the rule depend on > the type of the pointed-to object. I like the new guideline better, but I > don’t remember the WebKit project discussion about making this change.
Looks like the language in guidelines never changed. The rule for pointers was added in almost the current form in
r12863
13 years ago. The only change is that references are no longer mentioned for non-C++ code. But it is also my memory that we always interpreted this as object type difference, not as file type difference. Given that .m files can become .mm ones, having a fle type difference doesn't make a lot of sense.
Michael Catanzaro
Comment 9
2018-12-17 15:29:39 PST
(In reply to Alexey Proskuryakov from
comment #8
)
> But it is also my memory that we always interpreted this as object type > difference, not as file type difference. Given that .m files can become .mm > ones, having a fle type difference doesn't make a lot of sense.
FWIW it definitely makes sense for C vs. C++ types. E.g. we always write e.g. WebKitWebView* in WebKit C++ code rather than WebKitWebView * as we do in the public headers. Style checker would rightly throw a fit otherwise. .m vs. .mm may be an entirely different matter and the desirable behavior there might be different, of course.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug