From: Douglas Gregor Date: Tue, 6 Apr 2010 04:03:12 +0000 (+0000) Subject: clang-wpa fixes for Diagnostic X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7969f936a1128c9d1dff2f76daf590a968244a35;p=clang clang-wpa fixes for Diagnostic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100518 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 Diags( - CompilerInstance::createDiagnostics(DiagOpts, argc, argv)); - - llvm::IntrusiveRefCntPtr Diags(new Diagnostic); + llvm::IntrusiveRefCntPtr Diags + = CompilerInstance::createDiagnostics(DiagOpts, argc, argv); for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { const std::string &InFile = InputFilenames[i]; llvm::OwningPtr AST(ASTUnit::LoadFromPCHFile(InFile, Diags));