This is an archive of the discontinued LLVM Phabricator instance.

[clang] Use SourceLocation as key in std::map, NFCI
ClosedPublic

Authored by miyuki on Oct 19 2020, 8:36 AM.

Details

Summary

SourceLocation implements operator<, so SourceLocation-s can be used
as keys in std::map directly, there is no need to extract the internal
representation.

Since the operator< simply compares the internal representations of
its operands, this patch does not introduce any functional changes.

Diff Detail

Event Timeline

miyuki created this revision.Oct 19 2020, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2020, 8:36 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
miyuki requested review of this revision.Oct 19 2020, 8:36 AM
dexonsmith accepted this revision.Oct 19 2020, 9:58 AM

LGTM, assuming fix the linter problem by running git show -U0 | clang-format-diff.py -i -p1 (or similar).

This revision is now accepted and ready to land.Oct 19 2020, 9:58 AM
This revision was landed with ongoing or failed builds.Oct 19 2020, 10:31 AM
This revision was automatically updated to reflect the committed changes.