Bug 193676

Summary: check-webkit-style reports false-positive whitespace/init warning in C++ initialization parameters
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, commit-queue, ddkilzer, ews-watchlist, glenn, lforschler, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=193654
Attachments:
Description Flags
Patch v1 none

Description David Kilzer (:ddkilzer) 2019-01-22 11:16:22 PST
check-webkit-style reports false-positive whitespace/init warning in C++ initialization parameters.

Happens with Bug 193654 Attachment 359696 [details] patch on these lines:

 PreviewConverter::PreviewConverter(id delegate, const ResourceResponse& response, const String& password)
-    : m_platformConverter { adoptNS([allocQLPreviewConverterInstance() initWithConnection:nil delegate:delegate response:response.nsURLResponse() options:optionsWithPassword(password)]) }
+    : m_platformConverter { adoptNS([PAL::allocQLPreviewConverterInstance() initWithConnection:nil delegate:delegate response:response.nsURLResponse() options:optionsWithPassword(password)]) }

 PreviewConverter::PreviewConverter(NSData *data, const String& uti, const String& password)
-    : m_platformConverter { adoptNS([allocQLPreviewConverterInstance() initWithData:data name:nil uti:uti options:optionsWithPassword(password)]) }
+    : m_platformConverter { adoptNS([PAL::allocQLPreviewConverterInstance() initWithData:data name:nil uti:uti options:optionsWithPassword(password)]) }

Basically, the whitespace/init method needs to ignore the colon at the beginning of the line inside the first C++ initialization parameter.
Comment 1 David Kilzer (:ddkilzer) 2019-01-22 11:57:34 PST
Created attachment 359759 [details]
Patch v1
Comment 2 WebKit Commit Bot 2019-01-22 14:51:24 PST
Comment on attachment 359759 [details]
Patch v1

Clearing flags on attachment: 359759

Committed r240299: <https://trac.webkit.org/changeset/240299>
Comment 3 WebKit Commit Bot 2019-01-22 14:51:26 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-01-22 14:52:28 PST
<rdar://problem/47461487>