Make llvm::Error generated from replacement interfaces more specific.
Summary: The new error information contains the type of error (e.g. overlap or bad file path) and the replacement(s) that is causing the error. This enables us to resolve some errors. For example, for insertion at the same location conflict, we need to know the existing replacement which conflicts with the new replacement in order to calculate the new position to be insert before/after the existing replacement (for merging). Reviewers: klimek, bkramer Subscribers: djasper, cfe-commits Differential Revision: https://reviews.llvm.org/D26853 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287639 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Tooling/Core/Replacement.h 56 additions, 0 deletionsinclude/clang/Tooling/Core/Replacement.h
- lib/Tooling/Core/Replacement.cpp 35 additions, 20 deletionslib/Tooling/Core/Replacement.cpp
- unittests/Tooling/RefactoringTest.cpp 75 additions, 19 deletionsunittests/Tooling/RefactoringTest.cpp
Loading
Please register or sign in to comment