aboutsummaryrefslogtreecommitdiff
path: root/tools/index-test/index-test.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-06 09:56:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-06 09:56:30 +0000
commitbb3503a146f5eee6393a8b7542f38d9f5fce6583 (patch)
tree56ecd5477e49608727ae31ed5e5495ee7ddcdb15 /tools/index-test/index-test.cpp
parenteae18f89ede182c686e8ee47014fdb3cd3ed496c (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 'tools/index-test/index-test.cpp')
-rw-r--r--tools/index-test/index-test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp
index d13b2d4926..0b1971f797 100644
--- a/tools/index-test/index-test.cpp
+++ b/tools/index-test/index-test.cpp
@@ -238,8 +238,9 @@ int main(int argc, char **argv) {
Indexer Idxer(Prog);
llvm::SmallVector<TUnit*, 4> TUnits;
+ DiagnosticOptions DiagOpts;
llvm::OwningPtr<Diagnostic> Diags(
- CompilerInstance::createDiagnostics(DiagnosticOptions(), argc, argv));
+ CompilerInstance::createDiagnostics(DiagOpts, argc, argv));
// If no input was specified, read from stdin.
if (InputFilenames.empty())