tbourvon abandoned this revision.
tbourvon added inline comments.
Comment at: clang-tidy/utils/LexerUtils.h:26
+/// Get source code text for statement.
+Optional getStmtText(const Stmt* Statement, const SourceManager&
SM);
+
alexfh wrote:
> aaron.ballman wrote:
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 getStmtText(const Stmt* Statement, const SourceManager&
SM);
+
aaron.ballman added inline comments.
Comment at: clang-tidy/utils/LexerUtils.cpp:39
+Optional getStmtText(const Stmt* Statement, const SourceManager&
SM) {
+ if (!Statement) {
+return llvm::NoneType();
You should elide the curly braces here.
=
tbourvon created this revision.
tbourvon added a reviewer: lebedev.ri.
tbourvon added a project: clang-tools-extra.
Herald added subscribers: hintonda, xazax.hun, mgorny.
This is a simple Lexer util to get the source text of a statement given as
parameter. This is needed for https://reviews.llvm.