[analyzer] Enable the self-init checker under command-line option '-analyzer-check-objc-self-init' which by default
is enabled by the driver for '--analyze'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124266 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/AnalysisConsumer.cpp b/lib/StaticAnalyzer/Checkers/AnalysisConsumer.cpp
index ae8732a..9190e2d 100644
--- a/lib/StaticAnalyzer/Checkers/AnalysisConsumer.cpp
+++ b/lib/StaticAnalyzer/Checkers/AnalysisConsumer.cpp
@@ -357,6 +357,9 @@
   if (C.Opts.EnableExperimentalChecks)
     RegisterExperimentalChecks(Eng);
 
+  if (C.Opts.ObjCSelfInitCheck && isa<ObjCMethodDecl>(D))
+    registerObjCSelfInitChecker(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