[all-commits] [llvm/llvm-project] 1fabe6: [libTooling] Change `addInclude` to use expansion ...

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Thu Jan 14 19:18:10 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fabe6e51917bcd7a1242294069c682fe6dffa45
      https://github.com/llvm/llvm-project/commit/1fabe6e51917bcd7a1242294069c682fe6dffa45
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2021-01-15 (Fri, 15 Jan 2021)

  Changed paths:
    M clang/include/clang/Tooling/Transformer/RewriteRule.h
    M clang/lib/Tooling/Transformer/RewriteRule.cpp

  Log Message:
  -----------
  [libTooling] Change `addInclude` to use expansion locs.

This patch changes the default range used to anchor the include insertion to use
an expansion loc.  This ensures that the location is valid, when the user relies
on the default range.

Driveby: extend a FIXME for a problem that was emphasized by this change; fix some spellings.

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




More information about the All-commits mailing list