Don't enable static analysis support for C++ by default.  Users are
accidentally using it without realizing that it is nowhere close
to being generally usable and are reporting crashes that we
already know about.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97960 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer
index e3db5ea..daf5f7f 100755
--- a/tools/scan-build/ccc-analyzer
+++ b/tools/scan-build/ccc-analyzer
@@ -380,13 +380,20 @@
   '-isysroot' => 0  
 );
 
+##----------------------------------------------------------------------------##
+# Languages accepted.
+##----------------------------------------------------------------------------##
+
 my %LangsAccepted = (
   "objective-c" => 1,
-  "c" => 1,
-  "c++" => 1,
-  "objective-c++" => 1
+  "c" => 1
 );
 
+if (defined $ENV{'CCC_ANALYZER_CPLUSPLUS'}) {
+  $LangsAccepted{"c++"} = 1;
+  $LangsAccepted{"objective-c++"} = 1;
+}
+
 ##----------------------------------------------------------------------------##
 #  Main Logic.
 ##----------------------------------------------------------------------------##