llvm-project/clang/lib/Tooling
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
..
ASTDiff [AST] Update the comments of the various Expr::Ignore* + Related cleanups 2019-02-03 19:50:56 +00:00
Core [clang-tidy] Add fix descriptions to clang-tidy checks. 2019-04-17 12:53:59 +00:00
Inclusions [Tooling] Handle #pragma once header guard in include insertion. 2019-01-29 14:40:01 +00:00
Refactoring [LibTooling] Change Transformer's TextGenerator to a partial function. 2019-04-30 16:48:33 +00:00
AllTUsExecution.cpp [Tooling] Avoid working-dir races in AllTUsToolExecutor 2019-03-22 11:01:13 +00:00
ArgumentsAdjusters.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build 2018-12-12 08:02:18 +00:00
CommonOptionsParser.cpp [CommandLineParser] Add DefaultOption flag 2019-04-15 17:18:10 +00:00
CompilationDatabase.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Execution.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileMatchTrie.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FixIt.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
InterpolatingCompilationDatabase.cpp [Tooling] add a Heuristic field indicating that a CompileCommand was guessed. 2019-04-05 15:22:20 +00:00
JSONCompilationDatabase.cpp [clang][Tooling] Delete dots and dotdots when generating absolute paths 2019-03-08 09:42:04 +00:00
Refactoring.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RefactoringCallbacks.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StandaloneExecution.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Tooling.cpp Basic: Return a reference from FileManager::getVirtualFileSystem, NFC 2019-03-26 22:32:06 +00:00