[PATCH] D42623: [clang-tidy] Add a Lexer util to get the source text of a statement

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 13:44:38 PST 2018


alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang-tidy/utils/LexerUtils.h:26
+/// Get source code text for statement.
+Optional<StringRef> getStmtText(const Stmt* Statement, const SourceManager& SM);
+
----------------
aaron.ballman wrote:
> Formatting (elsewhere as well).
> 
> You should run the patch under clang-format to handle this sort of thing.
Have you seen clang::tooling::fixit::getText? It should cover this use case.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42623





More information about the cfe-commits mailing list