summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Grasman <kim.grasman@gmail.com>2019-08-31 19:09:09 +0200
committerKim Gräsman <kim.grasman@gmail.com>2019-09-01 16:29:49 +0200
commitb8edb821f252799b5584ed048caec5480de0244e (patch)
tree311d9196ead5e5e2466d16d7f72886edd7b2c17e
parentc2d74ac67a81734d99b294a182b7de3392b83872 (diff)
Clang r370122: ArrayRef in CompilerInvocation::CreateFromArgs
Update to use new API.
-rw-r--r--iwyu_driver.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/iwyu_driver.cc b/iwyu_driver.cc
index eaeba46..bd16314 100644
--- a/iwyu_driver.cc
+++ b/iwyu_driver.cc
@@ -205,11 +205,8 @@ CompilerInstance* CreateCompilerInstance(int argc, const char **argv) {
// Initialize a compiler invocation object from the clang (-cc1) arguments.
const ArgStringList &cc_arguments = command.getArguments();
- const char** args_start = const_cast<const char**>(cc_arguments.data());
- const char** args_end = args_start + cc_arguments.size();
std::shared_ptr<CompilerInvocation> invocation(new CompilerInvocation);
- CompilerInvocation::CreateFromArgs(*invocation,
- args_start, args_end, diagnostics);
+ CompilerInvocation::CreateFromArgs(*invocation, cc_arguments, diagnostics);
invocation->getFrontendOpts().DisableFree = false;
// Use libc++ headers bundled with Xcode.app on macOS.