Bug 231318 - Remove "using namespace XPath;" from XPathGrammar.cpp
Summary: Remove "using namespace XPath;" from XPathGrammar.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-06 12:10 PDT by Alex Christensen
Modified: 2021-10-18 17:49 PDT (History)
3 users (show)

See Also:


Attachments
Patch (75.06 KB, patch)
2021-10-06 12:11 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (73.42 KB, patch)
2021-10-06 13:04 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (74.93 KB, patch)
2021-10-06 13:25 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (73.02 KB, patch)
2021-10-06 13:26 PDT, Alex Christensen
cdumez: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-10-06 12:10:23 PDT
Remove "using namespace XPath;" from XPathGrammar.cpp
Comment 1 Alex Christensen 2021-10-06 12:11:37 PDT
Created attachment 440408 [details]
Patch
Comment 2 Darin Adler 2021-10-06 12:58:16 PDT
Oh, got it. Didn’t know we had checked in the yacc output! Sorry for trouble I caused while "helping".
Comment 3 Alex Christensen 2021-10-06 13:04:54 PDT
Created attachment 440422 [details]
Patch
Comment 4 Darin Adler 2021-10-06 13:23:10 PDT
Comment on attachment 440422 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440422&action=review

> Source/WebCore/xml/XPathGrammar.cpp:-2160
> -  IGNORE_CLANG_WARNINGS_BEGIN("unreachable-code")
>    if (/*CONSTCOND*/ 0)
>       goto yyerrorlab;
> -  IGNORE_CLANG_WARNINGS_END

I think we need to re-add this change? Since it’s a WebKit-specific macro, it’s unlikely this was generated by Bison.
Comment 5 Alex Christensen 2021-10-06 13:25:31 PDT
Created attachment 440429 [details]
Patch
Comment 6 Alex Christensen 2021-10-06 13:26:13 PDT
Created attachment 440430 [details]
Patch
Comment 7 Darin Adler 2021-10-06 14:00:13 PDT
Comment on attachment 440430 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440430&action=review

> Source/WebCore/ChangeLog:9
> +        I did this by editing XPathGrammar.y and re-running bison.
> +        We have the output of bison checked in to our repo to not have bison as a build dependency of WebKit.

Maybe we should record that "ignore warnings" step somewhere
Comment 8 Alex Christensen 2021-10-06 17:27:05 PDT
I'm not sure if the ignore warnings step is still needed.  It seems to have built fine without it.
Comment 9 Darin Adler 2021-10-06 18:12:23 PDT
(In reply to Alex Christensen from comment #8)
> I'm not sure if the ignore warnings step is still needed.  It seems to have
> built fine without it.

Could use git to research when it was done, by who, to see if that makes logical sense.
Comment 10 Alex Christensen 2021-10-11 07:13:42 PDT
Apparently I added the original pragma that ignored that warning in https://trac.webkit.org/changeset/209883/webkit and I don't remember why.  Perhaps it was to make EWS green.  EWS is green now so I don't think it's needed any more.
Comment 11 Radar WebKit Bug Importer 2021-10-13 12:11:17 PDT
<rdar://problem/84210320>
Comment 12 EWS 2021-10-18 16:46:07 PDT
commit-queue failed to commit attachment 440430 [details] to WebKit repository. To retry, please set cq+ flag again.
Comment 13 Alex Christensen 2021-10-18 17:49:51 PDT
I used svn to allow tabs rather than rewrite the generated source.
http://trac.webkit.org/r284420