clang API Documentation
A small class to be used by libclang clients to format a declaration string in memory. This object is instantiated once and used each time a formatting is needed. More...
#include <SimpleFormatContext.h>
Public Member Functions | |
SimpleFormatContext (LangOptions Options) | |
~SimpleFormatContext () | |
FileID | createInMemoryFile (StringRef Name, StringRef Content) |
std::string | getRewrittenText (FileID ID) |
Public Attributes | |
IntrusiveRefCntPtr < DiagnosticOptions > | DiagOpts |
IntrusiveRefCntPtr < DiagnosticsEngine > | Diagnostics |
FileManager | Files |
SourceManager | Sources |
Rewriter | Rewrite |
A small class to be used by libclang clients to format a declaration string in memory. This object is instantiated once and used each time a formatting is needed.
Definition at line 35 of file SimpleFormatContext.h.
clang::index::SimpleFormatContext::SimpleFormatContext | ( | LangOptions | Options | ) | [inline] |
Definition at line 37 of file SimpleFormatContext.h.
References Diagnostics.
Definition at line 47 of file SimpleFormatContext.h.
FileID clang::index::SimpleFormatContext::createInMemoryFile | ( | StringRef | Name, |
StringRef | Content | ||
) | [inline] |
Definition at line 49 of file SimpleFormatContext.h.
References clang::SrcMgr::C_User, clang::SourceManager::createFileID(), Files, clang::FileManager::getVirtualFile(), clang::SourceManager::overrideFileContents(), and Sources.
std::string clang::index::SimpleFormatContext::getRewrittenText | ( | FileID | ID | ) | [inline] |
Definition at line 59 of file SimpleFormatContext.h.
References clang::Rewriter::getEditBuffer(), Rewrite, and clang::RewriteBuffer::write().
IntrusiveRefCntPtr<DiagnosticsEngine> clang::index::SimpleFormatContext::Diagnostics |
Definition at line 68 of file SimpleFormatContext.h.
Referenced by SimpleFormatContext().
IntrusiveRefCntPtr<DiagnosticOptions> clang::index::SimpleFormatContext::DiagOpts |
Definition at line 67 of file SimpleFormatContext.h.
Definition at line 69 of file SimpleFormatContext.h.
Referenced by createInMemoryFile().
Definition at line 71 of file SimpleFormatContext.h.
Referenced by getRewrittenText().
Definition at line 70 of file SimpleFormatContext.h.
Referenced by createInMemoryFile().