forked from OSchip/llvm-project
[clangd] Fix data type of WorkDoneProgressReport::percentage
According to the specification, this should be an unsigned integer. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D101616
This commit is contained in:
parent
9ad9f0c731
commit
f088af37e6
|
@ -1606,7 +1606,7 @@ void ClangdLSPServer::onBackgroundIndexProgress(
|
|||
if (Stats.Completed < Stats.Enqueued) {
|
||||
assert(Stats.Enqueued > Stats.LastIdle);
|
||||
WorkDoneProgressReport Report;
|
||||
Report.percentage = 100.0 * (Stats.Completed - Stats.LastIdle) /
|
||||
Report.percentage = 100 * (Stats.Completed - Stats.LastIdle) /
|
||||
(Stats.Enqueued - Stats.LastIdle);
|
||||
Report.message =
|
||||
llvm::formatv("{0}/{1}", Stats.Completed - Stats.LastIdle,
|
||||
|
|
|
@ -631,7 +631,7 @@ struct WorkDoneProgressReport {
|
|||
///
|
||||
/// The value should be steadily rising. Clients are free to ignore values
|
||||
/// that are not following this rule.
|
||||
llvm::Optional<double> percentage;
|
||||
llvm::Optional<unsigned> percentage;
|
||||
};
|
||||
llvm::json::Value toJSON(const WorkDoneProgressReport &);
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue