Closed Bug 1472806 Opened 6 years ago Closed 6 years ago

fix some clang-cl warnings for Windows-specific code

Categories

(Core :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr60 --- fixed
firefox63 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(4 files)

We mistakenly use some MSVC extensions, which clang-cl warns about, and those warnings make the build noisy. Let's fix that.
There's no need to invoke std::move here, because Get() is already returning a temporary that can be moved into the RefPtr.
Attachment #8989262 - Flags: review?(aklotz)
clang-cl complains about things like: z:/build/build/src/obj-firefox/dist/include/mozilla/interceptor/VMSharingPolicies.h(53,50): warning: use of identifier 'GetLocalView' found via unqualified lookup into dependent bases of class templates is a Microsoft extension [-Wmicrosoft-template] return TrampolineCollection<MMPolicy>(*this, GetLocalView(), GetRemoteView(), ^ in various files in interceptor/, and since the warnings are in headers, rather than in sources, they're rather annoying. Let's fix this to be standards-complaint and make clang-cl stop complaining.
Attachment #8989263 - Flags: review?(aklotz)
MSVC permits the missing `typename` as an extension, whereas clang-cl warns. This is easy to fix, so let's fix the warning noise.
Attachment #8989264 - Flags: review?(aklotz)
Attachment #8989262 - Flags: review?(aklotz) → review+
Attachment #8989263 - Flags: review?(aklotz) → review+
Attachment #8989264 - Flags: review?(aklotz) → review+
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b8e6e7b84ce5 fix -Wpessimizing-move warnings in Interceptor.cpp; r=aklotz https://hg.mozilla.org/integration/mozilla-inbound/rev/53e44a1beb93 fix microsoft template lookup extensions in interceptor code; r=aklotz https://hg.mozilla.org/integration/mozilla-inbound/rev/be73fc773100 fix missing typename warning in COMPtrHolder.h; r=aklotz
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment on attachment 8989264 [details] [diff] [review] fix missing typename warning in COMPtrHolder.h .
Attachment #8989264 - Flags: approval-mozilla-esr60?
Attachment #8989264 - Flags: approval-mozilla-esr60?
This is a rebased version of the original patch that includes an additional site to fix. I'm taking the r+ from the original patch. [ESR Uplift Approval Request] If this is not a sec:{high,crit} bug, please state case for ESR consideration: Needed for MinGW Job. User impact if declined: We won't be able to land the MinGW build job in the configuration Tor uses Fix Landed on Version: 20180704 Risk to taking this patch: Low Why is the change risky/not risky? (and alternatives if risky): It's just a compiler warning fix String or UUID changes made by this patch:
Attachment #9031027 - Flags: review+
Attachment #9031027 - Flags: approval-mozilla-esr60?
Comment on attachment 9031027 [details] [diff] [review] fix missing typename warning in COMPtrHolder.h (esr60) Build fixes needed for Tor. Approved for ESR60.
Attachment #9031027 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
This was pushed, but I noticed afterwards that the patch had a different bug number on it. https://hg.mozilla.org/releases/mozilla-esr60/rev/aaa9d1093d37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: