[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 24 11:48:03 PDT 2019


dexonsmith updated this revision to Diff 217024.
dexonsmith edited the summary of this revision.
dexonsmith added a subscriber: lhames.
dexonsmith added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Updated patch after running `check-clang` and learning more about `Expected`.  I've added a parallel API using `Optional<FileEntryRef>` for clients that don't want to do anything with the error.

@lhames, is it reasonable to add `llvm::expectedToOptional`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66705/new/

https://reviews.llvm.org/D66705

Files:
  clang/include/clang/Basic/FileManager.h
  clang/lib/Basic/FileManager.cpp
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Lex/HeaderMap.cpp
  clang/lib/Lex/HeaderSearch.cpp
  llvm/include/llvm/Support/Error.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66705.217024.patch
Type: text/x-patch
Size: 7221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190824/e07ae336/attachment.bin>


More information about the cfe-commits mailing list