Skip to content
Snippets Groups Projects
  • Rafael Espindola's avatar
    fdf3e453
    Don't use std::errc. · fdf3e453
    Rafael Espindola authored
    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.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239684 91177308-0d34-0410-b5e6-96231b3b80d8
    fdf3e453
    History
    Don't use std::errc.
    Rafael Espindola authored
    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.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239684 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.