summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorTom Care <tcare@apple.com>2010-08-06 22:23:07 +0000
committerTom Care <tcare@apple.com>2010-08-06 22:23:07 +0000
commit925501c5482be9f8520649c79e2c348a7332c87d (patch)
tree076af909afb083dddfb05fcaa588c5248f3a8b2c /clang/lib/Checker/AnalysisConsumer.cpp
parent45e07c8fc5d097bb0877ab1b1ff35229c89d09e1 (diff)
downloadbcm5719-llvm-925501c5482be9f8520649c79e2c348a7332c87d.tar.gz
bcm5719-llvm-925501c5482be9f8520649c79e2c348a7332c87d.zip
Removed IdempotentOperationChecker from default analysis and returned back to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes - Updated test cases to explictly call the checker llvm-svn: 110482
Diffstat (limited to 'clang/lib/Checker/AnalysisConsumer.cpp')
-rw-r--r--clang/lib/Checker/AnalysisConsumer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Checker/AnalysisConsumer.cpp b/clang/lib/Checker/AnalysisConsumer.cpp
index 2607664406e..ad5ccb503b2 100644
--- a/clang/lib/Checker/AnalysisConsumer.cpp
+++ b/clang/lib/Checker/AnalysisConsumer.cpp
@@ -29,6 +29,7 @@
#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
#include "clang/Checker/PathDiagnosticClients.h"
#include "GRExprEngineExperimentalChecks.h"
+#include "GRExprEngineInternalChecks.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/AnalyzerOptions.h"
@@ -343,6 +344,12 @@ static void ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr,
if (C.Opts.EnableExperimentalChecks)
RegisterExperimentalChecks(Eng);
+ // Enable idempotent operation checking if it was explicitly turned on, or if
+ // we are running experimental checks (i.e. everything)
+ if (C.Opts.IdempotentOps || C.Opts.EnableExperimentalChecks
+ || C.Opts.EnableExperimentalInternalChecks)
+ RegisterIdempotentOperationChecker(Eng);
+
// Set the graph auditor.
llvm::OwningPtr<ExplodedNode::Auditor> Auditor;
if (mgr.shouldVisualizeUbigraph()) {
OpenPOWER on IntegriCloud