This is an archive of the discontinued LLVM Phabricator instance.

Diagnose when "future_error(error_code)" constructor is called by user code
Needs ReviewPublic

Authored by EricWF on Feb 4 2017, 2:44 PM.

Details

Reviewers
mclow.lists
Summary

The constructor future_error(error_code) isn't part of the C++ standard, but libc++ provides it in order to construct future_error's before C++17.
However since it's non-standard we probably shouldn't be providing it all. We could make the constructor private but I suspect users already depend
on this extension. Instead this patch does the following:

  1. Make it explicit so it doesn't cause weird implicit conversion bugs.
  2. Generate a warning when the constructor is called from user code.
  3. Cleanup tests that depend on the constructor.

@mclow.lists thoughts on handling this?

Diff Detail

Event Timeline

EricWF created this revision.Feb 4 2017, 2:44 PM