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