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 /examples | |
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 'examples')
-rw-r--r-- | examples/wpa/clang-wpa.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/wpa/clang-wpa.cpp b/examples/wpa/clang-wpa.cpp index cca7907ba0..ae789fa9ae 100644 --- a/examples/wpa/clang-wpa.cpp +++ b/examples/wpa/clang-wpa.cpp @@ -33,8 +33,9 @@ int main(int argc, char **argv) { if (InputFilenames.empty()) return 0; + DiagnosticOptions DiagOpts; llvm::OwningPtr<Diagnostic> Diags( - CompilerInstance::createDiagnostics(DiagnosticOptions(), argc, argv)); + CompilerInstance::createDiagnostics(DiagOpts, argc, argv)); for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { const std::string &InFile = InputFilenames[i]; |