From 05e6f5b6e91deeb93793957ec3fd00ef453eded3 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 25 Sep 2009 05:55:59 +0000 Subject: [PATCH] Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users. llvm-svn: 82752 --- clang/lib/Driver/Tools.cpp | 3 +++ clang/utils/ccc-analyzer | 2 +- clang/utils/scan-build | 10 ++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 9472928f40b9..1044e0229270 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -532,6 +532,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-static-define"); if (isa(JA)) { + // Enable region store model by default. + CmdArgs.push_back("-analyzer-store=region"); + // Add default argument set. if (!Args.hasArg(options::OPT__analyzer_no_default_checks)) { CmdArgs.push_back("-warn-dead-stores"); diff --git a/clang/utils/ccc-analyzer b/clang/utils/ccc-analyzer index e60c69425e74..ddc5030bc2ef 100755 --- a/clang/utils/ccc-analyzer +++ b/clang/utils/ccc-analyzer @@ -378,7 +378,7 @@ if (!defined($Analyses)) { $Analyses = '-checker-cfref'; } # Get the store model. my $StoreModel = $ENV{'CCC_ANALYZER_STORE_MODEL'}; -if (!defined $StoreModel) { $StoreModel = "basic"; } +if (!defined $StoreModel) { $StoreModel = "region"; } # Get the constraints engine. my $ConstraintsModel = $ENV{'CCC_ANALYZER_CONSTRAINTS_MODEL'}; diff --git a/clang/utils/scan-build b/clang/utils/scan-build index 4b097a72ecba..78394b179d56 100755 --- a/clang/utils/scan-build +++ b/clang/utils/scan-build @@ -949,10 +949,12 @@ ADVANCED OPTIONS: used by checker-0.160 and earlier. -store [model] - Specify the store model used by the analyzer. By default, - the 'basic' store model is used. 'region' specifies a field- - sensitive store model. Be warned that the 'region' model - is still in very early testing phase and may often crash. - + the 'region' store model is used. 'region' specifies a field- + sensitive store model. Users can also specify 'basic', which + is far less precise but can more quickly analyze code. + 'basic' was the default store model for checker-0.221 and + earlier. + -no-failure-reports - Do not create a 'failures' subdirectory that includes analyzer crash reports and preprocessed source files.