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

RESOLVED FIXED in Firefox 53

Status

RESOLVED FIXED
2 years ago
8 months ago

People

(Reporter: ting, Assigned: Ehsan)

Tracking

Trunk
mozilla53
Unspecified
Windows

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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)
(Assignee)

Updated

2 years ago
Flags: needinfo?(ehsan)
(Assignee)

Comment 2

2 years ago
Created attachment 8813249 [details] [diff] [review]
Ignore system headers for the implicit constructor check

Ting-Yu, can you please test this patch?
Attachment #8813249 - Flags: review?(michael)
Attachment #8813249 - Flags: feedback?(janus926)
(Assignee)

Updated

2 years ago
Assignee: nobody → ehsan

Updated

2 years ago
Attachment #8813249 - Flags: review?(michael) → review+
(Reporter)

Comment 3

2 years ago
Comment on attachment 8813249 [details] [diff] [review]
Ignore system headers for the implicit constructor check

Yes, it works.
Attachment #8813249 - Flags: feedback?(janus926) → feedback+

Comment 4

2 years ago
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cbbb7be5fe57
Ignore system headers for the implicit constructor check; r=mystor

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cbbb7be5fe57
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox53: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53

Updated

8 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.