[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 3 07:06:54 PST 2020


ymandel created this revision.
ymandel added a reviewer: gribozavr.
Herald added a project: clang.

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 ';'.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72153

Files:
  clang/include/clang/Tooling/Transformer/SourceCode.h
  clang/lib/Tooling/Transformer/SourceCode.cpp
  clang/unittests/Tooling/SourceCodeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72153.236056.patch
Type: text/x-patch
Size: 18957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200103/1d142545/attachment-0001.bin>


More information about the cfe-commits mailing list