summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-26 01:26:50 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-26 01:26:50 +0000
commitbd5a94e263137dc3ce7c100485626bae025cf58e (patch)
treebccdb91bff347b676837b0c008af3e43f39a3163 /lib/Frontend/CompilerInvocation.cpp
parenta4356adfd4a79bd63f86e2b30878795ce7b9b0a6 (diff)
downloadclang-bd5a94e263137dc3ce7c100485626bae025cf58e.tar.gz
[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
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index c3f3dbd1f9..28cae64bff 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -118,6 +118,8 @@ static void AnalyzerOptsToArgs(const AnalyzerOptions &Opts,
Res.push_back("-analyzer-experimental-internal-checks");
if (Opts.IdempotentOps)
Res.push_back("-analyzer-check-idempotent-operations");
+ if (Opts.ObjCSelfInitCheck)
+ Res.push_back("-analyzer-check-objc-self-init");
if (Opts.BufferOverflows)
Res.push_back("-analyzer-check-buffer-overflows");
}
@@ -868,6 +870,7 @@ static void ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
Opts.MaxLoop = Args.getLastArgIntValue(OPT_analyzer_max_loop, 4, Diags);
Opts.InlineCall = Args.hasArg(OPT_analyzer_inline_call);
Opts.IdempotentOps = Args.hasArg(OPT_analysis_WarnIdempotentOps);
+ Opts.ObjCSelfInitCheck = Args.hasArg(OPT_analysis_WarnObjCSelfInit);
Opts.BufferOverflows = Args.hasArg(OPT_analysis_WarnBufferOverflows);
}