WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
32301
Add "using std::foo" rule checked by script to coding style guidelines
https://bugs.webkit.org/show_bug.cgi?id=32301
Summary
Add "using std::foo" rule checked by script to coding style guidelines
Chris Jerdonek
Reported
2009-12-08 19:40:36 PST
This is a bug report to make the following changes and clarifications to the coding style guidelines: (1) Add this to the guidelines: Do not use statements of the form "using std:foo" in implementation files. Use "using namespace std" instead. (The script currently enforces this rule, but for header files and not just implementation files.) (2) Clarify that the rule to put "using namespace" statements near the beginning of a file applies only to implementation files. (It currently applies also to header files.) Also, strengthen the rule so it applies to all "using" statements in implementation files and not just "using namespace" statements. (The above is excerpted from an e-mail to the webkit-dev list -- linked to by the URL for this report.)
Attachments
Proposed patch
(3.11 KB, patch)
2009-12-08 20:00 PST
,
Chris Jerdonek
darin
: review+
Details
Formatted Diff
Diff
Revised patch
(3.11 KB, patch)
2009-12-09 10:16 PST
,
Chris Jerdonek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Jerdonek
Comment 1
2009-12-08 20:00:36 PST
Created
attachment 44509
[details]
Proposed patch Changes made as reported. Also, all the "using" statement style guidelines now lead with "In header files" or "In implementation files," etc. so it is immediately obvious what types of files each rule applies to.
WebKit Review Bot
Comment 2
2009-12-08 20:05:20 PST
style-queue ran check-webkit-style on
attachment 44509
[details]
without any errors.
Darin Adler
Comment 3
2009-12-09 09:31:44 PST
Comment on
attachment 44509
[details]
Proposed patch
> +<li>In header files in the WTF sub-library, however, it is acceptable > +to use "using" declarations at the end of the file to include one > +or more names in the WTF namespace into the global scope.
I think the use of the verb "include" here is strange. I think it should be "add" or "import" instead.
Chris Jerdonek
Comment 4
2009-12-09 10:16:38 PST
Created
attachment 44543
[details]
Revised patch Changed the two uses of "include" to "import" -- as suggested.
WebKit Review Bot
Comment 5
2009-12-09 10:19:49 PST
style-queue ran check-webkit-style on
attachment 44543
[details]
without any errors.
WebKit Commit Bot
Comment 6
2009-12-09 15:08:55 PST
Comment on
attachment 44543
[details]
Revised patch Clearing flags on attachment: 44543 Committed
r51929
: <
http://trac.webkit.org/changeset/51929
>
WebKit Commit Bot
Comment 7
2009-12-09 15:09:01 PST
All reviewed patches have been landed. Closing bug.
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