In Bug 57239, a "using namespace WebCore;" statement caused issues when compiling WebCore on iOS (even though the body of HTMLConverter.mm was commented out). Such "using namespace" statements are very dangerous in headers, so check-webkit-style should flag them as an error. I'm told that llvm (clang) may warn about "using namespace" statements in headers in the future, but since not all ports will be using llvm to compile WebKit, it would still be good to have this in check-webkit-style.
fwiw, the code is here: http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py And I'm willing to give pointers (and reviews) to anyone who wants to add checks.
Created attachment 206762 [details] Patch
Comment on attachment 206762 [details] Patch Clearing flags on attachment: 206762 Committed r152719: <http://trac.webkit.org/changeset/152719>
All reviewed patches have been landed. Closing bug.
This patch is buggy. It seems check-webkit-style checks "using namespace" statements not only in headers but also in cpp files too. See https://bugs.webkit.org/show_bug.cgi?id=110136#c14 Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp:45: Do not use 'using namespace WebCore;'. [build/using_namespace] [4]
(In reply to comment #5) > This patch is buggy. It seems check-webkit-style checks "using namespace" statements not only in headers but also in cpp files too. > > See https://bugs.webkit.org/show_bug.cgi?id=110136#c14 > Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp:45: Do not use 'using namespace WebCore;'. [build/using_namespace] [4] I filed Bug 118755 to fix this.