diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-06 09:56:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-06 09:56:30 +0000 |
commit | bb3503a146f5eee6393a8b7542f38d9f5fce6583 (patch) | |
tree | 56ecd5477e49608727ae31ed5e5495ee7ddcdb15 /include/clang/Frontend/CompilerInstance.h | |
parent | eae18f89ede182c686e8ee47014fdb3cd3ed496c (diff) |
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 27153b63c8..18ec429db7 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -419,9 +419,13 @@ public: /// logging information. /// /// Note that this creates an unowned DiagnosticClient, if using directly the - /// caller is responsible for releaseing the returned Diagnostic's client + /// caller is responsible for releasing the returned Diagnostic's client /// eventually. /// + /// \param Opts - The diagnostic options; note that the created text + /// diagnostic object contains a reference to these options and its lifetime + /// must extend past that of the diagnostic engine. + /// /// \return The new object on success, or null on failure. static Diagnostic *createDiagnostics(const DiagnosticOptions &Opts, int Argc, char **Argv); |