Bug 189732 - [Win][Clang] UNUSED_PARAM(this) causes compilation error of "cannot take the address of an rvalue of type"
Summary: [Win][Clang] UNUSED_PARAM(this) causes compilation error of "cannot take the ...
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: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 171618
  Show dependency treegraph
 
Reported: 2018-09-18 21:18 PDT by Fujii Hironori
Modified: 2018-09-20 19:51 PDT (History)
10 users (show)

See Also:


Attachments
Patch (1.35 KB, patch)
2018-09-18 21:24 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-09-18 21:18:29 PDT
[Win][Clang] UNUSED_PARAM(this) causes compilation error of "cannot take the address of an rvalue of type"

While doing Bug 171618, following compilation error is reported.

> [16/31] Building CXX object Source\WebKit\CMakeFiles\WebKit.dir\__\__\DerivedSources\WebKit\unified-sources\UnifiedSource22.cpp.obj
> FAILED: Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource22.cpp.obj 
> C:\tools\llvm\bin\clang-cl.exe (...) -c DerivedSources\WebKit\unified-sources\UnifiedSource22.cpp
> In file included from DerivedSources\WebKit\unified-sources\UnifiedSource22.cpp:5:
> ..\..\Source\WebKit\UIProcess/Network/NetworkProcessProxy.cpp(154,9):  error: cannot take the address of an rvalue of type 'WebKit::NetworkProcessProxy *'
>         UNUSED_PARAM(this);
>         ^            ~~~~
> DerivedSources\ForwardingHeaders\wtf/Compiler.h(367,38):  note: expanded from macro 'UNUSED_PARAM'
> #define UNUSED_PARAM(variable) (void)&variable
>                                      ^~~~~~~~~
> In file included from DerivedSources\WebKit\unified-sources\UnifiedSource22.cpp:5:
> ..\..\Source\WebKit\UIProcess/Network/NetworkProcessProxy.cpp(171,9):  error: cannot take the address of an rvalue of type 'WebKit::NetworkProcessProxy *'
>         UNUSED_PARAM(this);
>         ^            ~~~~
> DerivedSources\ForwardingHeaders\wtf/Compiler.h(367,38):  note: expanded from macro 'UNUSED_PARAM'
> #define UNUSED_PARAM(variable) (void)&variable
>                                      ^~~~~~~~~
> In file included from DerivedSources\WebKit\unified-sources\UnifiedSource22.cpp:5:
> ..\..\Source\WebKit\UIProcess/Network/NetworkProcessProxy.cpp(189,9):  error: cannot take the address of an rvalue of type 'WebKit::NetworkProcessProxy *'
>         UNUSED_PARAM(this);
>         ^            ~~~~
> DerivedSources\ForwardingHeaders\wtf/Compiler.h(367,38):  note: expanded from macro 'UNUSED_PARAM'
> #define UNUSED_PARAM(variable) (void)&variable
>                                      ^~~~~~~~~
> 3 errors generated.


See Also:

Bug 113440 – [WinCE] Add workaround for UNUSED_PARAM()
Bug 115350 – [WIN] Add workaround for UNUSED_PARAM()
Comment 1 Fujii Hironori 2018-09-18 21:24:13 PDT
Created attachment 350092 [details]
Patch
Comment 2 Fujii Hironori 2018-09-20 15:49:09 PDT
R?
Comment 3 Per Arne Vollan 2018-09-20 19:28:47 PDT
Comment on attachment 350092 [details]
Patch

r=me
Comment 4 Fujii Hironori 2018-09-20 19:50:45 PDT
Comment on attachment 350092 [details]
Patch

Clearing flags on attachment: 350092

Committed r236302: <https://trac.webkit.org/changeset/236302>
Comment 5 Fujii Hironori 2018-09-20 19:50:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-09-20 19:51:36 PDT
<rdar://problem/44665709>