summaryrefslogtreecommitdiffstats
path: root/clang/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
commit1597da4c05501ae592d1eabe86a8466337a76ded (patch)
treedfa6b46eb2cace0d1d5b5aa923ddf682829a3e6a /clang/tools/index-test/index-test.cpp
parenta6cb9f21be1aa41396943df2a93437ab843e983d (diff)
downloadbcm5719-llvm-1597da4c05501ae592d1eabe86a8466337a76ded.tar.gz
bcm5719-llvm-1597da4c05501ae592d1eabe86a8466337a76ded.zip
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
llvm-svn: 90704
Diffstat (limited to 'clang/tools/index-test/index-test.cpp')
-rw-r--r--clang/tools/index-test/index-test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/index-test/index-test.cpp b/clang/tools/index-test/index-test.cpp
index d13b2d49264..0b1971f797c 100644
--- a/clang/tools/index-test/index-test.cpp
+++ b/clang/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())
OpenPOWER on IntegriCloud