diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-22 23:17:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-22 23:17:23 +0000 |
commit | d770f73facd5cca11567b651c0dda86dc2bc96ea (patch) | |
tree | c581951ead3b9aedba3de080daab3ccb67e31e90 /clang/include/clang-c/Index.h | |
parent | 45fceea0e45b5440675b3c18d6d1d26eacf606e1 (diff) | |
download | bcm5719-llvm-d770f73facd5cca11567b651c0dda86dc2bc96ea.tar.gz bcm5719-llvm-d770f73facd5cca11567b651c0dda86dc2bc96ea.zip |
Rework the CIndex API for displaying diagnostics. Instead of printing
the diagnostics to a FILE*, return a CXString containing the formatted
diagnostic.
llvm-svn: 96823
Diffstat (limited to 'clang/include/clang-c/Index.h')
-rw-r--r-- | clang/include/clang-c/Index.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 5426256d43a..6d1a02fb4f7 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -460,23 +460,22 @@ enum CXDiagnosticDisplayOptions { }; /** - * \brief Display the given diagnostic by printing it to the given file. + * \brief Format the given diagnostic in a manner that is suitable for display. * - * This routine will display the given diagnostic to a file, rendering + * This routine will format the given diagnostic to a string, rendering * the diagnostic according to the various options given. The * \c clang_defaultDiagnosticDisplayOptions() function returns the set of * options that most closely mimics the behavior of the clang compiler. * * \param Diagnostic The diagnostic to print. * - * \param File The file to print to (e.g., \c stderr). - * * \param Options A set of options that control the diagnostic display, * created by combining \c CXDiagnosticDisplayOptions values. + * + * \returns A new string containing for formatted diagnostic. */ -CINDEX_LINKAGE void clang_displayDiagnostic(CXDiagnostic Diagnostic, - FILE *File, - unsigned Options); +CINDEX_LINKAGE CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, + unsigned Options); /** * \brief Retrieve the set of display options most similar to the |