This patch is an attempt to extend the operator overloading for ' - ' and ' + ' operators.
While implementing #D105565 (Print time taken to analyze each function), we realized that the ' - ' operator isn't overloaded on llvm::TimeRecord.
Previously:
CheckerEndTime -= CheckerStartTime; DisplayTime(CheckerEndTime);
Now:
DisplayTime(CheckerEndTime - CheckerStartTime);
Did you try the suggested canonical form from https://en.cppreference.com/w/cpp/language/operators? It's a bit shorter and they say it's more optimizer-friendly.