Fix issue with double quotation of macros
Fixes foonathan/standardese#117.
This commit is contained in:
parent
9605bb328f
commit
44fbe78b2e
3 changed files with 33 additions and 18 deletions
|
|
@ -25,13 +25,14 @@ void require_flags(const libclang_compile_config& config, const char* flags)
|
|||
auto config_flags = detail::libclang_compile_config_access::flags(config);
|
||||
// skip until including __cppast_version__minor__, those are the default options
|
||||
auto in_default = true;
|
||||
for (auto iter = config_flags.begin(); iter != config_flags.end(); ++iter)
|
||||
for (auto& config_flag : config_flags)
|
||||
{
|
||||
if (*iter == "-D__cppast_version_minor__=\"" CPPAST_VERSION_MINOR "\"")
|
||||
if (config_flag == "-D__cppast_version_minor__=" CPPAST_VERSION_MINOR)
|
||||
in_default = false;
|
||||
else if (!in_default)
|
||||
result += *iter + ' ';
|
||||
result += config_flag + ' ';
|
||||
}
|
||||
REQUIRE(!result.empty());
|
||||
result.pop_back();
|
||||
REQUIRE(result == flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue