llvm-project/clang/lib/Tooling/Refactoring
Yitzhak Mandelbaum aecc59c5f9 [LibTooling] Change Transformer's TextGenerator to a partial function.
Summary:
Changes the signature of the TextGenerator std::function to return an Expected<std::string>
instead of std::string to allow for (non-fatal) failures.  Previously, we
expected that any failures would be expressed with assertions. However, that's
unfriendly to running the code in servers or other places that don't want their
library calls to crash the program.

Correspondingly, updates Transformer's handling of failures in TextGenerators
and the signature of `ChangeConsumer`.

Reviewers: ilya-biryukov

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61015

llvm-svn: 359574
2019-04-30 16:48:33 +00:00
..
Extract Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Rename [Lookup] Invisible decls should not be ambiguous when renaming. 2019-04-15 08:46:34 +00:00
ASTSelection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTSelectionRequirements.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AtomicChange.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [LibTooling] Add Stencil library for format-string style codegen. 2019-04-18 17:23:01 +00:00
RefactoringActions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SourceCode.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
Stencil.cpp [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected. 2019-04-29 16:57:40 +00:00
Transformer.cpp [LibTooling] Change Transformer's TextGenerator to a partial function. 2019-04-30 16:48:33 +00:00