[PATCH] D65534: [clang] Change FileManager to use llvm::ErrorOr instead of null on failure
Jonas Devlieghere via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 16:19:19 PDT 2019
JDevlieghere added inline comments.
================
Comment at: clang/include/clang/Basic/FileManager.h:217
///
- /// This returns NULL if the file doesn't exist.
+ /// This returns a \c std::error_code if there was an error loading the file.
///
----------------
harlanhaskins wrote:
> jkorous wrote:
> > Does that mean that it's now safe to assume the value is `!= NULL` in the absence of errors?
> That's the intent of these changes, yes, but it should also be documented. 👍
In line with the previous comment, should we just pass a reference then?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65534/new/
https://reviews.llvm.org/D65534
More information about the cfe-commits
mailing list