Skip to content

Commit 14ccaed

Browse files
committed
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
1 parent c0301b2 commit 14ccaed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Tooling/Core/Replacement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ calculateRangesAfterReplacements(const Replacements &Replaces,
503503
std::string(R.getLength(), ' ')));
504504
assert(!Err &&
505505
"Replacements must not conflict since ranges have been merged.");
506-
(void)Err;
506+
llvm::consumeError(std::move(Err));
507507
}
508508
return FakeReplaces.merge(Replaces).getAffectedRanges();
509509
}

0 commit comments

Comments
 (0)