Ensure compatibility with clang 4.0.0

There are some bug fixes for libclang, so now some workarounds were broken.
This commit is contained in:
Jonathan Müller 2017-04-02 19:23:49 +02:00
commit dc5abeb785
5 changed files with 24 additions and 13 deletions

View file

@ -88,7 +88,7 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_namespace_alias(const detail::pars
// <nested identifier>;
std::string target_name;
while (!detail::skip_if(stream, ";"))
while (!stream.done() && !detail::skip_if(stream, ";"))
target_name += stream.get().c_str();
auto target = cpp_namespace_ref(parse_ns_target_cursor(cur), std::move(target_name));
@ -112,7 +112,7 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_using_directive(const detail::pars
// <nested identifier>;
std::string target_name;
while (!detail::skip_if(stream, ";"))
while (!stream.done() && !detail::skip_if(stream, ";"))
target_name += stream.get().c_str();
auto target = cpp_namespace_ref(parse_ns_target_cursor(cur), std::move(target_name));
@ -177,7 +177,7 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_using_declaration(
// <nested identifier>;
std::string target_name;
while (!detail::skip_if(stream, ";"))
while (!stream.done() && !detail::skip_if(stream, ";"))
target_name += stream.get().c_str();
auto target = cpp_entity_ref(parse_entity_target_cursor(cur), std::move(target_name));