struct Rewriter::RewriteOptions
Declaration
struct Rewriter::RewriteOptions { /* full declaration omitted */ };
Declared at: clang/include/clang/Rewrite/Core/Rewriter.h:38
Member Variables
- public bool IncludeInsertsAtBeginOfRange = true
- Given a source range, true to include previous inserts at the beginning of the range as part of the range itself (true by default).
- public bool IncludeInsertsAtEndOfRange = true
- Given a source range, true to include previous inserts at the end of the range as part of the range itself (true by default).
- public bool RemoveLineIfEmpty = false
- FIXME: This sometimes corrupts the file's rewrite buffer due to incorrect indexing in the implementation (see the FIXME in clang::RewriteBuffer::RemoveText). Moreover, it's inefficient because it must scan the buffer from the beginning to find the start of the line. When feasible, it's better for the caller to check for a blank line and then, if found, expand the removal range to include it. Checking for a blank line is easy if, for example, the caller can guarantee this is the first edit of a line. In that case, it can just scan before and after the removal range until the next newline or begin/end of the input.
Method Overview
- public RewriteOptions()
Methods
ΒΆRewriteOptions()
RewriteOptions()
Declared at: clang/include/clang/Rewrite/Core/Rewriter.h:62