diff options
Diffstat (limited to 'lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r-- | lib/Frontend/CreateInvocationFromCommandLine.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp index ea7de7a411..ab62b633cd 100644 --- a/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -90,9 +90,7 @@ std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine( const ArgStringList &CCArgs = Cmd.getArguments(); auto CI = std::make_unique<CompilerInvocation>(); - if (!CompilerInvocation::CreateFromArgs( - *CI, const_cast<const char **>(CCArgs.data()), - const_cast<const char **>(CCArgs.data()) + CCArgs.size(), *Diags) && + if (!CompilerInvocation::CreateFromArgs(*CI, CCArgs, *Diags) && !ShouldRecoverOnErorrs) return nullptr; return CI; |