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

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Wed Feb 26 06:58:07 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 38b4516de8a4a791d17085d37f95e3cc15c359f9
      https://github.com/llvm/llvm-project/commit/38b4516de8a4a791d17085d37f95e3cc15c359f9
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2020-02-26 (Wed, 26 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:
Second attempt -- the first was reverted in commit 0e480b39c66143ad142f9a30d8d40e49d7d7b0ce, because of test breakages. This revision fixes the cause of the test breakages.

Original description follows:
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