Add proper build system

This commit is contained in:
Jonathan Müller 2017-04-02 18:37:57 +02:00
commit e10a41fea8
14 changed files with 331 additions and 9 deletions

View file

@ -30,8 +30,8 @@ const std::vector<std::string>& detail::libclang_compile_config_access::flags(
libclang_compile_config::libclang_compile_config() : compile_config({})
{
set_clang_binary("clang++");
add_include_dir(LIBCLANG_SYSTEM_INCLUDE_DIR);
set_clang_binary(CPPAST_CLANG_BINARY);
add_include_dir(CPPAST_LIBCLANG_SYSTEM_INCLUDE_DIR);
}
void libclang_compile_config::do_set_flags(cpp_standard standard,

View file

@ -80,7 +80,7 @@ std::unique_ptr<cpp_entity> detail::parse_entity(const detail::parse_context& co
case CXCursor_UnexposedDecl:
// go through all the try_parse_XXX functions
if (auto entity = try_parse_cpp_language_linkage(context, cur))
return std::move(entity);
return entity;
break;
case CXCursor_Namespace:

View file

@ -154,7 +154,7 @@ namespace
std::unique_ptr<cpp_type> make_cv_qualified(std::unique_ptr<cpp_type> entity, cpp_cv cv)
{
if (cv == cpp_cv_none)
return std::move(entity);
return entity;
return cpp_cv_qualified_type::build(std::move(entity), cv);
}
@ -285,7 +285,7 @@ namespace
std::unique_ptr<cpp_type> make_ref_qualified(std::unique_ptr<cpp_type> type, cpp_reference ref)
{
if (ref == cpp_ref_none)
return std::move(type);
return type;
return cpp_reference_type::build(std::move(type), ref);
}