From 38c8fe705ec4a8efa8992b99ab6d264fff14ca36 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 24 Feb 2011 08:42:20 +0000 Subject: Allow passing a list of comma separated checker names to -analyzer-checker, e.g: -analyzer-checker=cocoa,unix git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126372 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 026508ac0e..c90ac70628 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -891,8 +891,13 @@ static void ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, const Arg *A = *it; A->claim(); bool enable = (A->getOption().getID() == OPT_analyzer_checker); - Opts.CheckersControlList.push_back(std::make_pair(A->getValue(Args), - enable)); + // We can have a list of comma separated checker names, e.g: + // '-analyzer-checker=cocoa,unix' + llvm::StringRef checkerList = A->getValue(Args); + llvm::SmallVector checkers; + checkerList.split(checkers, ","); + for (unsigned i = 0, e = checkers.size(); i != e; ++i) + Opts.CheckersControlList.push_back(std::make_pair(checkers[i], enable)); } } -- cgit v1.2.3-18-g5258