Bug 166067 - check-webkit-style misinterprets 'const' in declarations
Summary: check-webkit-style misinterprets 'const' in declarations
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-20 09:11 PST by Brent Fulgham
Modified: 2016-12-20 10:15 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2016-12-20 09:11:29 PST
The 'check-webkit-style' script misinterprets the following method declaration;

    void setOverlayMessage(ErrorString&, const String* const) final;

It improperly believes that the second 'const' is a parameter name because it does not recognize that this is telling the compiler that the pointer cannot be changed:

    const String* immutableContents; // Declares a pointer whose contents cannot be changed.
    String* const immutablePointer; // Declares a pointer that cannot be changed.
    const String* const immutableContents; // Declares a pointer that cannot be changed, and whose contents cannot be changed.