[cfe-commits] r123727 - /cfe/trunk/examples/wpa/clang-wpa.cpp
Ted Kremenek
kremenek at apple.com
Mon Jan 17 20:22:19 PST 2011
Author: kremenek
Date: Mon Jan 17 22:22:19 2011
New Revision: 123727
URL: http://llvm.org/viewvc/llvm-project?rev=123727&view=rev
Log:
Get clang-wpa to build in TOT (reflecting updates
to the static analyzer).
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=123727&r1=123726&r2=123727&view=diff
==============================================================================
--- cfe/trunk/examples/wpa/clang-wpa.cpp (original)
+++ cfe/trunk/examples/wpa/clang-wpa.cpp Mon Jan 17 22:22:19 2011
@@ -14,10 +14,10 @@
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
-#include "clang/GR/PathSensitive/AnalysisManager.h"
-#include "clang/GR/PathSensitive/ExprEngine.h"
-#include "clang/GR/PathSensitive/TransferFuncs.h"
-#include "clang/GR/Checkers/LocalCheckers.h"
+#include "clang/StaticAnalyzer/PathSensitive/AnalysisManager.h"
+#include "clang/StaticAnalyzer/PathSensitive/ExprEngine.h"
+#include "clang/StaticAnalyzer/PathSensitive/TransferFuncs.h"
+#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Index/CallGraph.h"
@@ -91,7 +91,9 @@
= 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::LoadFromASTFile(InFile, Diags));
+ llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromASTFile(InFile, Diags,
+ FileSystemOptions(),
+ false, 0, 0, true));
if (!AST)
return 1;
@@ -130,6 +132,7 @@
Preprocessor &PP = TU->getPreprocessor();
// Hard code options for now.
+ using namespace clang::ento;
AnalysisManager AMgr(TU->getASTContext(), PP.getDiagnostics(),
PP.getLangOptions(), /* PathDiagnostic */ 0,
CreateRegionStoreManager,
@@ -138,7 +141,9 @@
/* VisualizeEG */ false, /* VisualizeEGUbi */ false,
/* PurgeDead */ true, /* EagerlyAssume */ false,
/* TrimGraph */ false, /* InlineCall */ true,
- /* UseUnoptimizedCFG */ false);
+ /* UseUnoptimizedCFG */ false,
+ /* addImplicitDtors */ true,
+ /* addInitializers */ false);
TransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false,
AMgr.getLangOptions());
More information about the cfe-commits
mailing list