diff options
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index dad99e39f6..b288236768 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -268,6 +268,22 @@ public: /// @name Construction Utility Methods /// { + /// Create the diagnostics engine using the invocation's diagnostic options + /// and replace any existing one with it. + /// + /// Note that this routine also replaces the diagnostic client. + void createDiagnostics(int Argc, char **Argv); + + /// Create a Diagnostic object with a the TextDiagnosticPrinter. + /// + /// The \arg Argc and \arg Argv arguments are used only for logging purposes, + /// when the diagnostic options indicate that the compiler should output + /// logging information. + /// + /// \return The new object on success, or null on failure. + static Diagnostic *createDiagnostics(const DiagnosticOptions &Opts, + int Argc, char **Argv); + /// Create the file manager and replace any existing one with it. void createFileManager(); |