diff options
author | Stephen Hines <srhines@google.com> | 2017-08-15 21:20:41 +0000 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2017-08-15 21:20:41 +0000 |
commit | 14ccaedbb88650c1743dd6d0524422606d8d7922 (patch) | |
tree | c42867f93aad4957b23ee2d82da2b118c51e189a | |
parent | c0301b2f5320a760d8a25152db7365bee53be794 (diff) | |
download | bcm5719-llvm-14ccaedbb88650c1743dd6d0524422606d8d7922.tar.gz bcm5719-llvm-14ccaedbb88650c1743dd6d0524422606d8d7922.zip |
Switch to consumeError(), since this can crash otherwise.
Summary:
If assertions are disabled, but LLVM_ABI_BREAKING_CHANGES is enabled,
this will cause an issue with an unchecked Success. Switching to
consumeError() is the correct way to bypass the check.
Reviewers: llvm-commits, cfe-commits, arphaman
Reviewed By: arphaman
Subscribers: arphaman, klimek, pirama
Differential Revision: https://reviews.llvm.org/D36728
llvm-svn: 310958
-rw-r--r-- | clang/lib/Tooling/Core/Replacement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Tooling/Core/Replacement.cpp b/clang/lib/Tooling/Core/Replacement.cpp index e194b59a6e2..6d4f3a34014 100644 --- a/clang/lib/Tooling/Core/Replacement.cpp +++ b/clang/lib/Tooling/Core/Replacement.cpp @@ -503,7 +503,7 @@ calculateRangesAfterReplacements(const Replacements &Replaces, std::string(R.getLength(), ' '))); assert(!Err && "Replacements must not conflict since ranges have been merged."); - (void)Err; + llvm::consumeError(std::move(Err)); } return FakeReplaces.merge(Replaces).getAffectedRanges(); } |