Path: blob/main/contrib/llvm-project/clang/lib/Tooling/FixIt.cpp
35233 views
//===--- FixIt.cpp - FixIt Hint utilities -----------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains implementations of utitilies to ease source code rewriting9// by providing helper functions related to FixItHint.10//11//===----------------------------------------------------------------------===//12#include "clang/Tooling/FixIt.h"13#include "clang/Lex/Lexer.h"1415namespace clang {16namespace tooling {17namespace fixit {1819namespace internal {20StringRef getText(CharSourceRange Range, const ASTContext &Context) {21return Lexer::getSourceText(Range, Context.getSourceManager(),22Context.getLangOpts());23}24} // namespace internal2526} // end namespace fixit27} // end namespace tooling28} // end namespace clang293031