diff options
author | Brad King <brad.king@kitware.com> | 2014-10-14 18:28:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-14 19:12:10 (GMT) |
commit | be9dd290ac1154c496f80a2d7a9517f85de42a59 (patch) | |
tree | 0e79c7a6790b71c7868527f0952ea2d03a9ba0f0 /src | |
parent | 7f85cb14aaec25bb434aa8f3f59a0824570d048c (diff) | |
download | CastXML-be9dd290ac1154c496f80a2d7a9517f85de42a59.zip CastXML-be9dd290ac1154c496f80a2d7a9517f85de42a59.tar.gz CastXML-be9dd290ac1154c496f80a2d7a9517f85de42a59.tar.bz2 |
Port to LLVM/Clang SVN r219684 (trunk)
Traversal of the clang::driver::JobList entries must now use
a range-based for loop.
Update expected test output to add throws="" to implicit class members
in c++98 mode (which Clang previously missed). First run
sed -i 's/artificial="1"/&( throws="")?/' test/expect/*.xml.txt
Then split the c++98 and c++11 outputs that have too many throws=""
instances for the CMake regex paren limit into separate files. For
c++98 we expect throws="" on implicit members. For c++11 we do not.
Diffstat (limited to 'src')
-rw-r--r-- | src/RunClang.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/RunClang.cxx b/src/RunClang.cxx index 6d83575..d8d6dea 100644 --- a/src/RunClang.cxx +++ b/src/RunClang.cxx @@ -306,10 +306,9 @@ static int runClangImpl(const char* const* argBeg, // Run Clang for each compilation computed by the driver. // This should be once per input source file. bool result = true; - for(clang::driver::JobList::const_iterator i = c->getJobs().begin(), - e = c->getJobs().end(); i != e; ++i) { + for(clang::driver::Job const& job : c->getJobs()) { clang::driver::Command const* cmd = - llvm::dyn_cast<clang::driver::Command>(i->get()); + llvm::dyn_cast<clang::driver::Command>(&job); if(cmd && strcmp(cmd->getCreator().getName(), "clang") == 0) { // Invoke Clang with this set of arguments. std::unique_ptr<clang::CompilerInstance> @@ -326,7 +325,7 @@ static int runClangImpl(const char* const* argBeg, // Skip this unexpected job. llvm::SmallString<128> buf; llvm::raw_svector_ostream msg(buf); - (*i)->Print(msg, "\n", true); + job.Print(msg, "\n", true); diags->Report(clang::diag::err_fe_expected_clang_command); diags->Report(clang::diag::err_fe_expected_compiler_job) << msg.str(); |