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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82752 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 9472928..1044e02 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -532,6 +532,9 @@
     CmdArgs.push_back("-static-define");
 
   if (isa<AnalyzeJobAction>(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/utils/ccc-analyzer b/utils/ccc-analyzer
index e60c694..ddc5030 100755
--- a/utils/ccc-analyzer
+++ b/utils/ccc-analyzer
@@ -378,7 +378,7 @@
 
 # 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/utils/scan-build b/utils/scan-build
index 4b097a7..78394b1 100755
--- a/utils/scan-build
+++ b/utils/scan-build
@@ -949,10 +949,12 @@
                         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.