1*7330f729Sjoerg //===--- FixIt.cpp - FixIt Hint utilities -----------------------*- C++ -*-===// 2*7330f729Sjoerg // 3*7330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*7330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information. 5*7330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*7330f729Sjoerg // 7*7330f729Sjoerg //===----------------------------------------------------------------------===// 8*7330f729Sjoerg // 9*7330f729Sjoerg // This file contains implementations of utitilies to ease source code rewriting 10*7330f729Sjoerg // by providing helper functions related to FixItHint. 11*7330f729Sjoerg // 12*7330f729Sjoerg //===----------------------------------------------------------------------===// 13*7330f729Sjoerg #include "clang/Tooling/FixIt.h" 14*7330f729Sjoerg #include "clang/Lex/Lexer.h" 15*7330f729Sjoerg 16*7330f729Sjoerg namespace clang { 17*7330f729Sjoerg namespace tooling { 18*7330f729Sjoerg namespace fixit { 19*7330f729Sjoerg 20*7330f729Sjoerg namespace internal { getText(CharSourceRange Range,const ASTContext & Context)21*7330f729SjoergStringRef getText(CharSourceRange Range, const ASTContext &Context) { 22*7330f729Sjoerg return Lexer::getSourceText(Range, Context.getSourceManager(), 23*7330f729Sjoerg Context.getLangOpts()); 24*7330f729Sjoerg } 25*7330f729Sjoerg } // namespace internal 26*7330f729Sjoerg 27*7330f729Sjoerg } // end namespace fixit 28*7330f729Sjoerg } // end namespace tooling 29*7330f729Sjoerg } // end namespace clang 30