WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 52428
check-webkit-style: _FunctionState should detect pure functions.
https://bugs.webkit.org/show_bug.cgi?id=52428
Summary
check-webkit-style: _FunctionState should detect pure functions.
David Levin
Reported
2011-01-13 23:57:42 PST
See summary.
Attachments
Patch
(7.71 KB, patch)
2011-01-14 00:08 PST
,
David Levin
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Levin
Comment 1
2011-01-14 00:08:23 PST
Created
attachment 78897
[details]
Patch
Shinichiro Hamaji
Comment 2
2011-01-14 00:18:01 PST
Comment on
attachment 78897
[details]
Patch Do we have a test case where =0 appears as a default parameter? func(void* p = 0); Though I believe your code works for this case, I guess it is worth adding.
Shinichiro Hamaji
Comment 3
2011-01-14 00:24:54 PST
Comment on
attachment 78897
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=78897&action=review
Looks good.
> Tools/Scripts/webkitpy/style/checkers/cpp.py:520 > + if not self.is_declaration:
I slightly prefer self.is_pure = False if self.is_declaration: ... self.is_pure = bool(...) because is_pure will be initialized even if someone happen to add elif-clause here. I think this comment is just my personal preference so please feel free to ignore this.
David Levin
Comment 4
2011-01-14 00:57:37 PST
Addressed both comments. Committed as
http://trac.webkit.org/changeset/75775
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