ΒΆCXString clang_getDiagnosticFixIt(
CXDiagnostic Diagnostic,
unsigned int FixIt,
CXSourceRange* ReplacementRange)
CXString clang_getDiagnosticFixIt(
CXDiagnostic Diagnostic,
unsigned int FixIt,
CXSourceRange* ReplacementRange)
Description
Retrieve the replacement information for a given fix-it. Fix-its are described in terms of a source range whose contents should be replaced by a string. This approach generalizes over three kinds of operations: removal of source code (the range covers the code to be removed and the replacement string is empty), replacement of source code (the range covers the code to be replaced and the replacement string provides the new code), and insertion (both the start and end of the range point at the insertion location, and the replacement string provides the text to insert).
Declared at: clang/include/clang-c/Index.h:1103
Parameters
- CXDiagnostic Diagnostic
- The diagnostic whose fix-its are being queried.
- unsigned int FixIt
- The zero-based index of the fix-it.
- CXSourceRange* ReplacementRange
- The source range whose contents will be replaced with the returned replacement string. Note that source ranges are half-open ranges [a, b), so the source code should be replaced from a and up to (but not including) b.
Returns
A string containing text that should be replace the source code indicated by the \c ReplacementRange.