Let CompilerInvocation initialization indicate failure
This fixes the FIXMEs in ParseAnalyzeArgs. (Also a precursor to moving the analyzer into an AST plugin.) For consistency, do the same with AssemblerInvocation. llvm-svn: 147218
This commit is contained in:
@@ -80,11 +80,12 @@ clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList,
|
||||
}
|
||||
|
||||
const driver::ArgStringList &CCArgs = Cmd->getArguments();
|
||||
CompilerInvocation *CI = new CompilerInvocation();
|
||||
CompilerInvocation::CreateFromArgs(*CI,
|
||||
llvm::OwningPtr<CompilerInvocation> CI(new CompilerInvocation());
|
||||
if (!CompilerInvocation::CreateFromArgs(*CI,
|
||||
const_cast<const char **>(CCArgs.data()),
|
||||
const_cast<const char **>(CCArgs.data()) +
|
||||
CCArgs.size(),
|
||||
*Diags);
|
||||
return CI;
|
||||
*Diags))
|
||||
return 0;
|
||||
return CI.take();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user