diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-06 04:03:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-06 04:03:12 +0000 |
commit | 7969f936a1128c9d1dff2f76daf590a968244a35 (patch) | |
tree | 9875b6b1e231e6a4c56d09cef89bb4d5f3bdd9c4 /examples | |
parent | 7f330856b8d5df764f1c91218471c47af9ae2aa5 (diff) |
clang-wpa fixes for Diagnostic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wpa/clang-wpa.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/wpa/clang-wpa.cpp b/examples/wpa/clang-wpa.cpp index 205d488c17..b515e33148 100644 --- a/examples/wpa/clang-wpa.cpp +++ b/examples/wpa/clang-wpa.cpp @@ -35,10 +35,8 @@ int main(int argc, char **argv) { return 0; DiagnosticOptions DiagOpts; - llvm::OwningPtr<Diagnostic> Diags( - CompilerInstance::createDiagnostics(DiagOpts, argc, argv)); - - llvm::IntrusiveRefCntPtr<Diagnostic> Diags(new Diagnostic); + llvm::IntrusiveRefCntPtr<Diagnostic> Diags + = CompilerInstance::createDiagnostics(DiagOpts, argc, argv); for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { const std::string &InFile = InputFilenames[i]; llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromPCHFile(InFile, Diags)); |