[all-commits] [llvm/llvm-project] a3c160: [clang] Use SourceLocation as key in std::map, NFCI

Mikhail Maltsev via All-commits all-commits at lists.llvm.org
Mon Oct 19 10:31:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a3c16039b3f119cd83d872f256c45599ae6ac60c
      https://github.com/llvm/llvm-project/commit/a3c16039b3f119cd83d872f256c45599ae6ac60c
  Author: Mikhail Maltsev <mikhail.maltsev at arm.com>
  Date:   2020-10-19 (Mon, 19 Oct 2020)

  Changed paths:
    M clang/lib/ARCMigrate/TransProperties.cpp
    M clang/lib/Frontend/Rewrite/InclusionRewriter.cpp

  Log Message:
  -----------
  [clang] Use SourceLocation as key in std::map, NFCI

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.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D89705




More information about the All-commits mailing list