[cfe-commits] r100518 - /cfe/trunk/examples/wpa/clang-wpa.cpp
Douglas Gregor
dgregor at apple.com
Mon Apr 5 21:03:12 PDT 2010
Author: dgregor
Date: Mon Apr 5 23:03:12 2010
New Revision: 100518
URL: http://llvm.org/viewvc/llvm-project?rev=100518&view=rev
Log:
clang-wpa fixes for Diagnostic
Modified:
cfe/trunk/examples/wpa/clang-wpa.cpp
Modified: cfe/trunk/examples/wpa/clang-wpa.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/wpa/clang-wpa.cpp?rev=100518&r1=100517&r2=100518&view=diff
==============================================================================
--- cfe/trunk/examples/wpa/clang-wpa.cpp (original)
+++ cfe/trunk/examples/wpa/clang-wpa.cpp Mon Apr 5 23:03:12 2010
@@ -35,10 +35,8 @@
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));
More information about the cfe-commits
mailing list