Don't use std::errc.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 13 Jun 2015 17:23:13 +0000 (17:23 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 13 Jun 2015 17:23:13 +0000 (17:23 +0000)
commit408b45249a708608d57a8ec377d7e70a84cd0080
treebe62461005ab67446dc7b38777d06bf846802c81
parent74f293249d9e60e3631fc8b08148ef3d8a4df72d
Don't use std::errc.

As noted on Errc.h:

// * std::errc is just marked with is_error_condition_enum. This means that
//   common patters like AnErrorCode == errc::no_such_file_or_directory take
//   4 virtual calls instead of two comparisons.

And on some libstdc++ those virtual functions conclude that

------------------------
int main() {
  std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
  return foo == std::errc::no_such_file_or_directory;
}
-------------------------

should exit with 0.

llvm-svn: 239684
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp