[all-commits] [llvm/llvm-project] 9c54f6: [libTooling] Add function to determine associated ...

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Tue Feb 25 13:38:26 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c54f6154f748e707ad2385ddf6d66e812890c6a
      https://github.com/llvm/llvm-project/commit/9c54f6154f748e707ad2385ddf6d66e812890c6a
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2020-02-25 (Tue, 25 Feb 2020)

  Changed paths:
    M clang/include/clang/Tooling/Transformer/SourceCode.h
    M clang/lib/Tooling/Transformer/SourceCode.cpp
    M clang/unittests/Tooling/SourceCodeTest.cpp

  Log Message:
  -----------
  [libTooling] Add function to determine associated text of a declaration.

Summary:
This patch adds `getAssociatedRange` which, for a given decl, computes preceding
and trailing text that would conceptually be associated with the decl by the
reader. This includes comments, whitespace, and separators like ';'.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list