ΒΆllvm::Optional<CharSourceRange> getRangeForEdit(
const clang::CharSourceRange& EditRange,
const clang::SourceManager& SM,
const clang::LangOptions& LangOpts)
llvm::Optional<CharSourceRange> getRangeForEdit(
const clang::CharSourceRange& EditRange,
const clang::SourceManager& SM,
const clang::LangOptions& LangOpts)
Description
Attempts to resolve the given range to one that can be edited by a rewrite; generally, one that starts and ends within a particular file. It supports a limited set of cases involving source locations in macro expansions. If a value is returned, it satisfies \c validateEditRange.
Declared at: clang/include/clang/Tooling/Transformer/SourceCode.h:98
Parameters
- const clang::CharSourceRange& EditRange
- const clang::SourceManager& SM
- const clang::LangOptions& LangOpts