Remove dependency on system include dir

This commit is contained in:
Jonathan Müller 2018-11-28 16:32:54 +01:00
commit 8a60d52be1
5 changed files with 58 additions and 25 deletions

View file

@ -23,14 +23,21 @@ inline void write_file(const char* name, const char* code)
file << code;
}
inline std::unique_ptr<cppast::cpp_file> parse_file(const cppast::cpp_entity_index& idx,
const char* name,
bool fast_preprocessing = false)
inline cppast::libclang_compile_config make_test_config()
{
using namespace cppast;
libclang_compile_config config;
config.set_flags(cpp_standard::cpp_latest);
return config;
}
inline std::unique_ptr<cppast::cpp_file> parse_file(const cppast::cpp_entity_index& idx,
const char* name,
bool fast_preprocessing = false)
{
using namespace cppast;
static auto config = make_test_config();
config.fast_preprocessing(fast_preprocessing);
libclang_parser p(default_logger());