Clang complains bad implicit conversion constructor for the header file exception of VS 2015

RESOLVED FIXED in Firefox 53

Status

defect
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: ting, Assigned: Ehsan)

Tracking

Trunk
mozilla53
Unspecified
Windows
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

While working on bug 1316545 I ran into this:

 0:22.67 error(clang): 'error' diagnostics seen but not expected:
 0:22.67   File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception Line 142: bad implicit conversion constructor for 'bad_exception'
 0:22.67   File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception Line 175: bad implicit conversion constructor for 'bad_alloc'
 0:22.67 error(clang): 'note' diagnostics seen but not expected:
 0:22.67   File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception Line 142: consider adding the explicit keyword to the constructor
 0:22.67   File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception Line 175: consider adding the explicit keyword to the constructor

I workarounded it by adding "explicit" to my local file, but for taskcluster probably it requires customized built vs2015 on tooltool.
Surely there must be a way to make system headers exempt from static analysis requirements, no?
Flags: needinfo?(ehsan)
Flags: needinfo?(ehsan)
Ting-Yu, can you please test this patch?
Attachment #8813249 - Flags: review?(michael)
Attachment #8813249 - Flags: feedback?(janus926)
Assignee: nobody → ehsan
Attachment #8813249 - Flags: review?(michael) → review+
Comment on attachment 8813249 [details] [diff] [review]
Ignore system headers for the implicit constructor check

Yes, it works.
Attachment #8813249 - Flags: feedback?(janus926) → feedback+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cbbb7be5fe57
Ignore system headers for the implicit constructor check; r=mystor
https://hg.mozilla.org/mozilla-central/rev/cbbb7be5fe57
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.