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
This commit is contained in:
parent
c0301b2f53
commit
14ccaedbb8
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue